Beginner's Tutorial: J2ME

I want to learn J2ME. And there are a lot of tutorials out there, so I'm kinda confuse which to pick first.
Can you guys recommend a good tutorial for beginners? Thanks!

DW4 is a real relic - released way back in 2000.  I hope you mean DW CS4 which uses modern web standards.
Dreamweaver (whichever version you use) is going to be much easier to learn if you understand HTML & CSS basics first.   Don't put the cart before the horse.
Start here:
http://w3schools.com/
Learn CSS positioning in 10 Steps
http://www.barelyfitz.com/screencast/html-training/css/positioning/
How to Develop with CSS?
http://phrogz.net/css/HowToDevelopWithCSS.html
Beginner CSS Templates ~
http://www.adobe.com/devnet/dreamweaver/articles/introducing_new_css_layouts.html
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media  Specialists 
http://alt-web.com/
http://twitter.com/altweb

Similar Messages

  • General Questions + looking for good beginner's tutorial

    Hello,
    I'm a web-developer with some hobbyist-level experience in programming Java applications.
    I'd like to write a content management system for my own clients, I was going to go with PHP, but thought I'd try it with Java instead. So the first step is to learn the Java web technologies! I'm pretty comfortable with the Java programming language, but I'm a complete novice when it comes to the Web APIs.
    After some messing about, I've got Tomcat 6 running in Linux, and have played around creating a few JSP 2.0 pages. My first impression is that it seems incredibly complicated to do something that would be very simple in PHP: I have to define a tag in an XML library, and create a whole new class & object, using "magic" methods etc., just to output something very simple. I actually had a look at the JSP 1.2 examples, and they looked to me much simpler and more intuitive, with the code written inline in the HTML, much more like PHP. That makes more sense to me, but I suppose I should make an effort to learn the newer technology? Should I be using Tomcat 7 to learn instead of Tomcat 6?
    I also had a look at the Java Servlet examples. These make more sense to me than JSP too. JSP pages just seem to be adding an extra layer of complexity on things with custom tags and tag definitions, etc., and I can't quite understand why. Maybe I will when I'm more experienced...
    Can anyone point me towards some good tutorials that start at the beginning. I've pieced together what I've been able to figure out so far from the Tomcat 6 documentation pages and by experimenting with the structure of the various xml files included with tomcat, as well as copying the structure of the Tomcat 6 example pages. I've tried doing google searches for tutorials, but they all are either very out-dated (circa 1999), or they assume a whole bunch of knowledge.
    I have learned a lot by experimenting with and re-creating the Tomcat 6 examples pages, but a good, simple, not-too-technical, beginner's tutorial would be a great help in "tying it all together" and removing some of the "magic stuff".
    Thanks very much for your help.

    The reason we separate projects into layers is because project grow over time to a point where its impossible to maintain if we don't separate it into modules.
    Here is a post I provided on my opinon on coming up to speed on your first web development project.
    http://forums.sun.com/thread.jspa?threadID=5433317&messageID=10960943#10960943
    Here is a MVC design approach to your first project.
    http://forums.sun.com/thread.jspa?threadID=5435833&messageID=10972163#10972163

  • A Beginner's Tutorial In Game Programming?

    Hi, I'm planning on making a simple tetris clone, nothing fancy.
    I'm having problems finding good resources, could you guys suggest a good tutorial?
    I've been learning Java for a month so I'm not really experienced.
    Thanks in advance! :)

    intrenet and java forums will be your best tutorial. try to make the application. if you stuck with any problem, submit it to us or google it.
    YOU WILL FIND YOUR ANSWER.

  • Looking for beginner's tutorial on Adobe Livecycle Designer 7

    Please point me to where I can find something basic to teach others new to this application,

    Here are some sources for information on designing forms using LC Designer:
    Designer's help file has a topic called
    Quick Start Tutorials which demonstrates how to create basic forms of various types.
    The
    Designer Developer Center has lots of useful information.
    On the Designer Developer Center, you'll find a
    samples page which contains many samples covering a wide range of topics from basic to advanced.
    Last but not least, these forums are a great source of information. There are tons of answered questions and samples in here!
    Stefan
    Adobe Systems

  • Tutorial for Grandpa

    Does anybody have or know of a SUPER beginner iPhone tutorial? I got my grandfather an iPhone hoping to keep in touch with him via email and occasionally send him a photo or two. I have ordered a Dummies book for seniors but it won't arrive for another week. I wish I could teach him in person but I live on another continent and I don't want to lose momentum--he's excited but quickly getting discouraged because I'm not to able to explain things well enough over the phone for him to "get it"--I'm talking real basic things like how to check mail. He has zero knowledge about what email really entails or what website browsing is about.) I hope to get him up to speed so that he eventually can send an email and do a google search. 

    Then start here:
    http://www.apple.com/support/iphone/

  • I have problim with j2me canavas sony ericsson

    Hi
    I am beginner in using J2me i am trying to creat a simple program for writing in Arabic on mobile phones , But it doesn't work on Sony Ericson
    The words appears in reverse every character seprate
    For Example
    ������ � � � � � �
    you will find the code as follows
    * TestArabicOnCanvas.java
    * Created on 09 ������, 2007, 05:11 �
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    public class TestArabicOnCanvas extends MIDlet{
    MyCanvas myCanvas;
    Display display;
    public void startApp() {
    myCanvas= new MyCanvas();
    display=Display.getDisplay(this);
    display.setCurrent(myCanvas);
    public void pauseApp(){   
    public void destroyApp(boolean unconditional){  
    class MyCanvas extends Canvas{
    protected void paint(Graphics graphics) {
    graphics.setColor(0,0,0);
    graphics.fillRect(0,0,getWidth(),getHeight());
    graphics.setColor(255,255,255);
    graphics.drawString("���� ������� ",10,10,Graphics.TOP|Graphics.LEFT);
    thank you

    Thank you very mouch for your replay ,
    Your soloution was of great help as the letters were reserved to the right order . but we are still having a problem becouse they are written separated from each other
    and i remember you the problim apear with me on sony ericsson only with arabic character
    thank you

  • Please, help me learn J2EE...point me out to better tutorials or something!

    Hi,
    Guys, I really need help in trying to learn what J2EE is.
    I've got prior knowledge and experience on Java (I thought), but ever since I came across the terms J2EE, EJB, JNI, JSP, JDBC and all that crap, I now don't know what I actually learnt!
    Please bear with me I beg of you! :)
    1.0: What I've learnt.
    ===============================
    So far, I've learnt (I think) the core/basics of the Java language, covering uhm...the basics up to GUIs, Arrays, IOStreams...yeah I think that's it.
    I code using notepad and compile them using the SDK...which up to now I still don't know if it is an SE or EE edition. It's j2sdk1.4.0 the last time I checked. I didn't use any IDE.
    I've done (school) projects like a Library System (involves loaning of books and charges etc etc), a Chalet Organizer (Loaning out chalets/rooms and charges etc etc) and an Appointment Organizer.
    So what was that which I learnt? Am I right to say that that is only core Java and nothing else and is next to worthless in the working world?
    2.0: Why I want to learn J2EE.
    ===============================
    Okay so why do I want to learn specifically J2EE? Well, most employment opportunities here require J2EE and EJB (and maybe some other alien terms) as prerequisites to being a "Java Programmer".
    I really need the job as soon as possible (for family's sake) and the job market here is already saturated with webmasters..
    3.0: What I have tried.
    ===============================
    Believe me, I tried for like 2 months already to try learn this thing on my own.
    I have followed almost exactly to the J2EE "Beginner's Tutorial" found on http://java.sun.com/j2ee/tutorial/ but no matter how far I read, I'm still just as clueless as I was when I was in my mother's womb about what J2EE is all about, even though I did the examples. I stopped somewhere in the middle of "Getting Started" because I realized I wasn't learning anything at all.
    4.0: Help meeeeeee...
    ===============================
    4.1:
    Can anyone please help me set my head straight and either point me to a REAL beginner's tutorial on J2EE and what the heck it is, or help explain to me slowly what J2EE really is and how to learn it?
    4.2:
    What's the difference between J2EE and J2SE?!? I initially thought that J2SE was simply just a smaller download which didn't include some of the heavier stuff that the EE carried, but boy was I wrong when that same tutorial asked me to install BOTH of them!
    4.3:
    Is it right for me to think that EJB are just files which are precoded to facilitate programming? e.g.:(I could've written up my own Date class instead of using the standard Date class that everybody uses.)
    4.4:
    What the hell is Jakarta Ant? Is it a builder and not a compiler, and may allow me to run built programs just by double-clicking on an e.g. executable? Like C++? So that I don't have to go to command prompt and type "java myApp.class"? (OT, but I think it's ridiculous that Apache has this and not Sun!!)
    4.5:
    Is there a simpler, much much much simpler example of a J2EE tutorial besides the overly vague tutorial "The Duke's Bank Application"? I need more examples of smaller scale maaaan... Better yet, is there a tutorial around that covers the very very very basics of Java all the way up to J2EE, step by step and with ample explanations?
    =========================
    Thanks all, I would really really appreciate any heads up you can provide me with.
    Sincerely, Kai.

    Lee and tsith - same fella -
    Run Tomcat as a standalone critter - the install of the current ver (4.1.12?) on a Windows machine sets it up nicely, and you don't have to worry about web connectors and stuff. Just create a few JSPs and dump them somewhere under the ROOT directory of your webapps directory and you should be able to hit them via a URL like http://localhost:8080/test.jsp (assuming you have it running on port 8080). Once you get your fill of the JSP thing, make a serrvlet and look into creating WAR files - then copy your WAR file into webapps subdirectory of your Tomcat installation and play with that. When you've had enough Servlet fun, then look into JBoss and making EAR files and you'll have all sorts of fun with JNDI and JDBC and all those other acronyms.
    Ant is just a build tool, not a compiler. Compiling simple java classes is no big deal, 'cause you just type javac MyClass.java or some such. But when you get into complicated build processes (like, compile these classes, making sure to include the J2EE jar and all the other jars I need, and create a WAR file, and deploy it to Tomcat) then Ant really helps.
    If you want help documenting your classes, the javadoc tool is for you.
    Lee

  • Where to start in Oracle Apps R12

    Hi
    I am completely new in Oracle Apps. I have lot of experience in Microsoft technologies (SQL Server, .Net) but never worked in Oracle Apps before. Now trying to learn it.
    I installed Oracle Apps R12 on a virtual linux machine for learning. I selected "empty database" at the time of installation (i.e. not Vision installation) and logged in as sysadmin. But now I don't know where to start. Let's say I want to use the Financials module to enter some fake data and then create a report. Where do I start? I searched in Google but looks like none of the "beginner's tutorial" have that info.
    Can someone help me or direct me to some tutorial/documentation which will help me to start?
    Thanks for your help.
    -Mike

    976849 wrote:
    Hi
    I am completely new in Oracle Apps. I have lot of experience in Microsoft technologies (SQL Server, .Net) but never worked in Oracle Apps before. Now trying to learn it.
    I installed Oracle Apps R12 on a virtual linux machine for learning. I selected "empty database" at the time of installation (i.e. not Vision installation) and logged in as sysadmin. But now I don't know where to start. Let's say I want to use the Financials module to enter some fake data and then create a report. Where do I start? I searched in Google but looks like none of the "beginner's tutorial" have that info.
    Can someone help me or direct me to some tutorial/documentation which will help me to start?
    Thanks for your help.
    -MikeR12 Docs
    http://docs.oracle.com/cd/E18727_01/index.htm
    11i and R12 Docs
    http://www.oracle.com/technetwork/documentation/applications-167706.html
    If you select vision (demo) database then you should have setup/data.
    Thanks,
    Hussein

  • Daily sales report with last  selling price

    Dear All,
    how to query daily sales record with last selling price as  following:
    cust. code ,  item  , unit price, last selling price to this cust. within 3 month ,  highest  selling price of  this item with 3months
    I'm new to both  SAP and SQL, Please help! Many Thanks!!
    Wing

    Hi,
       Try this........
    SELECT P.CardCode,P.CardName,P.ItemCode,
    [1] as [Jan],
    [2] as [Feb],
    [3] as [Mar],
      [4] as [Apr],
    [5] as [May],
    [6] as [Jun],
    [7] as [Jul],
    [8] as [Aug],
    [9] as [Sep],
    [10] as [Oct],
    [11] as [Nov],
    [12] as [Dec]
    FROM (SELECT (T0.CardCode),T0.CardName,t1.ItemCode,T1.price,MONTH(T1.Docdate)as month
    FROM dbo.OINV  T0
    inner join INV1 T1 ON T0.DocEntry=T1.DocEntry
    inner join OITM t2 on T1.ItemCode=t2.ItemCode 
    WHERE T1.DocDate>='[%0]' and T1.DocDate<='[%1]' and T1.ITEMCODE='[%2]'
    and T0.CardCode='[%3]'
    ) S
      PIVOT  (max(price) FOR [month] IN
    ([4],[5],[6],[7],[8],[9],[10],[11],[12],[1],[2],[3])) P
    ORDER BY P.[CardCode]
    Check this link for SQL tutorials.........
    http://beginner-sql-tutorial.com/sql-subquery.htm
    http://w3schools.com/sql/default.asp

  • How to put JScrolPAne in a JText Area

    JTextArea TArea=new JTextArea("",20,20);
    JScrollPane SPane= new JScrollPane(TArea);
    c.add(TArea,0);
    how??

    You could try something like:
    http://www.beginner-java-tutorial.com/java-swing-tutorial.html
    but I still think the one Sun has is the best. I did that years ago (1.2) and from there have just kept up with the changes and forums. Swing is complex, from the basic understanding of not blocking the event dispatch thread to understanding gridbaglayouts, you might want to try and find a really good book on swing (I used to have one a few years ago... don't ask me what it was...)

  • How to automate accept client of the server side?

    Hi.....
    I am a beginner of using J2ME to developing my final year project. I have some problem of using bluetooth packet. I can't accept again the client message when the server accepted before. Any one can solve my problem? How can I using the loop or timer to accept the client message without using acceptAndOpen() packet? Thank a lot.....
    The sample code is here:
    - Server side
    public class BluetoothServer implements Runnable {
         private GameMIDlet gameMIDlet;
         private HandleSetting setting;
         private HandleScore score;
         private ScreenGame screenGame;
         private int playerMethod;
         //private GUIGameServer guiGameServer;
    StreamConnectionNotifier notifier;
    StreamConnection conn;
    LocalDevice localDevice;
    ServiceRecord serviceRecord;
    InputStream input;
    OutputStream output;
    private boolean isInit;
    private boolean isReady;
    private static String serverUrl = "btspp://localhost:" + ScreenMultiPlay.SHARE_UUID + ";name=GameServer;authorize=true";
    public BluetoothServer(GameMIDlet gameMIDlet,HandleSetting setting, HandleScore score, int playerMethod) {
         this.gameMIDlet = gameMIDlet;
    this.setting = setting;
              this.score = score;
              this.playerMethod = playerMethod;
         isReady = false;
    isInit = false;
    Thread accepterThread = new Thread(this);
    accepterThread.start();
    public void run() {
    if (!isInit) {
    // Initialization is done in the thread to avoid dead lock 'isInit' ensures it is done once only
    try {
    conn = null;
    localDevice = LocalDevice.getLocalDevice();
    localDevice.setDiscoverable( DiscoveryAgent.GIAC );
    notifier = (StreamConnectionNotifier)Connector.open(serverUrl);
    } catch (BluetoothStateException e) {       
    System.err.println( "BluetoothStateException: " + e.getMessage() );
    } catch (IOException e) {       
    System.err.println( "IOException: " + e.getMessage() );
    isInit=true;
    System.out.println( "Starting Echo Server" );      
    try {
    System.out.println("\n\nServer Running...");
    isReady=true;
    if (isReady) {
         try {
                        screenGame = new ScreenGame(this.gameMIDlet,this.setting,this.score,playerMethod);
              screenGame.start();
    Display.getDisplay(gameMIDlet).setCurrent(screenGame);
                   } catch(Exception e) {
                        gameMIDlet.showErrorMsg(null);
    // Pauses thread until Transmission occurs
    conn = notifier.acceptAndOpen();
    // Read Data Transmission
    String msg = ScreenMultiPlay.readData(conn);
    System.out.println("Received Message from Client: " + msg);
    // Send Back a Message
    msg = "Hello Back from Server";
    output = conn.openOutputStream();
    output.write(msg.length()); // length is 1 byte
    output.write(msg.getBytes());
    output.close();
    } catch (Exception ex) {
    System.err.println("Bluetooth Server Running Error: " + ex);     
    public void destroy() {
    //isClosed = true;
    // finilize notifier work
    if (notifier != null) {
    try {
    notifier.close();
    isInit=false;
    } catch (IOException e) {} // ignore
    // wait for acceptor thread is done
    /*try {
    accepterThread.join();
    } catch (InterruptedException e) {} // ignore*/
    -Client side
    class BluetoothClient implements DiscoveryListener {
         private GameMIDlet gameMIDlet;
         private HandleSetting setting;
         private HandleScore score;
         private ScreenGame screenGame;
         private int playerMethod;
    private DiscoveryAgent discoveryAgent;
    private RemoteDevice[] remoteDevices;
    private UUID[] uuidSet;
    private String serviceUrl;
    public BluetoothClient(GameMIDlet gameMIDlet,HandleSetting setting, HandleScore score, int playerMethod) {
    this.gameMIDlet = gameMIDlet;
    this.setting = setting;
              this.score = score;
              this.playerMethod = playerMethod;
    try {
    LocalDevice localDevice = LocalDevice.getLocalDevice();
    discoveryAgent = localDevice.getDiscoveryAgent();      
    discoveryAgent.startInquiry(DiscoveryAgent.GIAC, this);
    //-----go to deviceDiscovered()-----------------
    } catch (Exception e) {
    System.out.println(e);
    public void deviceDiscovered(RemoteDevice btDevice, DeviceClass cod) {
    try {
    // Get Device Info
    System.out.println("Device Discovered");
    System.out.println("Major Device Class: " + cod.getMajorDeviceClass() + " Minor Device Class: " + cod.getMinorDeviceClass());
    System.out.println("Bluetooth Address: " + btDevice.getBluetoothAddress());
    System.out.println("Bluetooth Friendly Name: " + btDevice.getFriendlyName(true));
    // Search for Services
    uuidSet = new UUID[1];
    uuidSet[0] = ScreenMultiPlay.SHARE_UUID;
    int searchID = discoveryAgent.searchServices(null,uuidSet,btDevice,this);
    //-------------go to inquiryCompleted()----------------------
    } catch (Exception e) {
    System.out.println("Device Discovered Error: " + e);     
    public void inquiryCompleted(int discType) {
    System.out.println("InquiryCompleted");
    //---------------go to servicesDiscovered()------------------------
    public void servicesDiscovered(int transID, ServiceRecord[] servRecord) {
    System.out.println("ServicesDiscovered");
    // in this example there is only one service
    for(int i=0;i<servRecord.length;i++) {      
    serviceUrl = servRecord.getConnectionURL(0,false);
    //---------------go to serviceSearchCompleted()--------------------
    public void serviceSearchCompleted(int transID, int responseCode) {   
    if(responseCode == SERVICE_SEARCH_ERROR)
    System.out.println("SERVICE_SEARCH_ERROR\n");
    if(responseCode == SERVICE_SEARCH_COMPLETED) {
    System.out.println("SERVICE_SEARCH_COMPLETED\n");
    System.out.println("Service URL: " + serviceUrl);
    StreamConnection conn = null;
    try {
         String msg = "Say Hello World";
    conn = (StreamConnection)Connector.open(serviceUrl);
    OutputStream output = conn.openOutputStream();
    output.write(msg.length());
    output.write(msg.getBytes());
    output.close();
    System.out.println(ScreenMultiPlay.readData(conn));
    } catch (Exception ex) {
         System.out.println(ex);
    } finally {
         try {
         conn.close();
         } catch (IOException ioe) {
         System.out.println("Error Closing connection " + ioe);
    if(responseCode == SERVICE_SEARCH_TERMINATED)
    System.out.println("SERVICE_SEARCH_TERMINATED\n");
    if(responseCode == SERVICE_SEARCH_NO_RECORDS)
    System.out.println("SERVICE_SEARCH_NO_RECORDS\n");
    if(responseCode == SERVICE_SEARCH_DEVICE_NOT_REACHABLE)
    System.out.println("SERVICE_SEARCH_DEVICE_NOT_REACHABLE\n");

    This question isn't logical at all. You don't execute javascript on the server. But if you want to waste time on it. .. look at Rhino http://www.mozilla.org/rhino/
    Best of luck...

  • How do you get Automator to click a button on a web page?

    New to mac automation.  Finding the basic handling of URLs in automator relatively straightforward.  Cannot see however you can automate the click of a button on a web page.  Can any one help? 
    MacBook pro. Mountain lion.

    Watch Me Do may work, but it's also likely to fail.  The action records mouse and keyboard actions as they take place on screen.  If the (aptly abbreviated) WMD action doesn't find the expected screen elements--everything just where it first was when the recording was made--it will usually bomb.  In other words, WMD doesn't, for instance, find fields or buttons on a webpage, it simply navigates to a screen location and tries to type/click as it has been instructed in that spot.  A few pixels off, boom!
    As for AppleScript, here's one place to begin: http://www.macosxautomation.com/applescript/learn.html.  Look at the Beginner's Tutorial "start here" link materials.
    Explore the Mac OS X Technologies subforum, https://discussions.apple.com/community/mac_os/mac_os_x_technologies.  It's where the AppleScript mavens can be found.  If you search that forum for "learn AppleScript," you'll find great advice.

  • Ps not working: Basic File- New does not provide area to work in

    I installed PS CC ... started it up... tried File->New and no layer shows up... it shows up on right side.

    System is Firefox, Win 7 (SP1)  running on i7 @ 2.20 GHz.   Laptop - 8GB 64-bit OS
    Not sure about document setting?  [I am new to Photoshop... I did not do change any settings just started it up... I was just following the beginner's tutorial for creating a college, I didn't do any changes to any settings... after installation.
    This morning after several hours .... the Ps "work space" showed the 2 layers - Background and photo (that I dragged and dropped)....
    So it seems that performance is UNBELIEVABLELY SLOW...
    I tried to resize the photo but nothing happens on the work space.... the right side bar shows photo in lower right quadrant ... but actual photo is taking most of the background (before I resized)...
    Any tips on speeding up performance?

  • Using Applescript to convert avi dropped into a folder to iTunes

    Hi everyone,
    Im new to Applescript. Im trying to write a script that will take .avi files dropped into a certain folder and automatically start iSquint, add the files to iSquint and then start the conversion.
    I use Vuze to download video. Vuze will automatically move completed downloads to a folder named "to be converted".
    My goal is to set that folder up so that every time something is moved to the folder, it will start the script and convert the files to an iTunes format. iSquint will automatically add them to my iTunes library once the conversion is complete.
    So Vuze and iSquint are doing the start and finish of this task, as well as the heavy work of actually downloading and converting. Its just all the stuff in the middle that I need.
    Ive gotten as far as getting the script to get Finder to point to the folder and start iSquint. But thats it. Also, the script will only get Finder to point to the folder if Finder is already open. If everything is closed, nothing happens.
    tell application "Finder"
    activate
    set target of Finder window 1 to folder "To be converted" of folder "My Downloads" of folder "Movies" of folder "mark" of folder "Users" of startup disk
    end tell
    tell application "iSquint"
    activate
    end tell
    Can someone get me moving in the right direction. Oh yeah did I mention I hardly know a thing about Applescript, so you might need to add the "obvious" details.
    thanks!
    mark

    Since you hardly know a thing about Applescript, you might first have a look at this [Web page|http://www.macosxautomation.com/applescript> about AppleScript and this [Beginner's Tutorial|http://www.macosxautomation.com/applescript/firsttutorial/index.html].
    Then you might try to attach a Folder Action script to the folder named “to be converted”.
    See [Folder Actions Reference|http://developer.apple.com/mac/library/documentation/AppleScript/Conc eptual/AppleScriptLangGuide/reference/ASLRfolderactions.html] in the [AppleScript Language Guide|http://developer.apple.com/mac/library/documentation/AppleScript/Conceptu al/AppleScriptLangGuide/introduction/ASLRintro.html#//appleref/doc/uid/TP40000983-CH208-SW1].
    See also the example scripts in this folder: “/Library/Scripts/Folder Action Scripts/”, particularly the example entitled “add - new item alert.scpt”.
    Your Action Folder script should look somewhat like the following:
    on adding folder items to this_folder after receiving added_items
    try
    tell application "iSquint"
    activate
    --the rest of your code
    end tell
    end try
    end adding folder items to
    where this_folder is the folder named "to be converted" and added_items is a list of the .avi files added to the folder.
    Good luck!
    Message was edited by: Pierre L.

  • PHP error help needed

    I've worked through the Adobe tutorial, "Developing a web
    application with
    Dreamweaver"
    http://www.adobe.com/devnet/dreamweaver/articles/develop_web_application.html).
    Everything works fine until I get to the final step of
    testing the Record
    Insert form be submitting data. When I click the Insert
    record button
    instead of going to the View page I get these errors for each
    form field:
    Warning: mysql_real_escape_string()
    [function.mysql-real-escape-string]:
    Access denied for user 'ODBC'@'localhost' (using password:
    NO) in
    F:\Webs\cafe_php\TMPh4f4n13a5b.php on line 8
    Warning: mysql_real_escape_string()
    [function.mysql-real-escape-string]: A
    link to the server could not be established in
    F:\Webs\cafe_php\TMPh4f4n13a5b.php on line 8
    The warnings appear on the form page above the page itself.
    When I connected the database to the site the test worked.
    Here are the first 8 lines of code:
    <?php require_once('Connections/connTownsend.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "",
    $theNotDefinedValue = "")
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue)
    : $theValue;
    $theValue = function_exists("mysql_real_escape_string") ?
    mysql_real_escape_string($theValue) :
    mysql_escape_string($theValue);
    Any suggestions?
    Walt

    First, thanks for helping.
    2nd, sorry to be so thick, this is all still Greek to me, but
    I have no idea
    where to insert
    with a die($rsInsert_query):
    Here is all the PHP code above the DOCTYPE:
    <?php require_once('Connections/connTownsend.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "",
    $theNotDefinedValue = "")
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue)
    : $theValue;
    $theValue = function_exists("mysql_real_escape_string") ?
    mysql_real_escape_string($theValue) :
    mysql_escape_string($theValue);
    switch ($theType) {
    case "text":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    break;
    case "long":
    case "int":
    $theValue = ($theValue != "") ? intval($theValue) : "NULL";
    break;
    case "double":
    $theValue = ($theValue != "") ? "'" . doubleval($theValue) .
    "NULL";
    break;
    case "date":
    $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    break;
    case "defined":
    $theValue = ($theValue != "") ? $theDefinedValue :
    $theNotDefinedValue;
    break;
    return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
    $editFormAction .= "?" .
    htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) &&
    ($_POST["MM_insert"] == "form1")) {
    $insertSQL = sprintf("INSERT INTO comments (FIRST_NAME,
    LAST_NAME) VALUES
    (%s, %s)",
    GetSQLValueString($_POST['FIRST_NAME'], "text"),
    GetSQLValueString($_POST['LAST_NAME'], "text"));
    mysql_select_db($database_connTownsend, $connTownsend);
    $Result1 = mysql_query($insertSQL, $connTownsend) or
    die(mysql_error());
    ?>
    Walt
    "Murray *ACE*" <[email protected]> wrote
    in message
    news:[email protected]...
    > Walt - this is a good puzzle.
    >
    > All of your observations suggest that you have adequate
    permissions, yet,
    > this error says you don't -
    >
    >> Warning: mysql_real_escape_string()
    [function.mysql-real-escape-string]:
    >> A link to the server could not be established in
    >> F:\Webs\GoFreeFuel\TMP4r8sq1dpfl.php on line 8
    >
    > Let's take a look at your insert command - can you trap
    the insert process
    > with a die($rsInsert_query) command, right before the
    actually execution?
    >
    > --
    > Murray --- ICQ 71997575
    > Adobe Community Expert
    > (If you *MUST* email me, don't LAUGH when you do so!)
    > ==================
    >
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    > ==================
    >
    >
    > "Walt F. Schaefer" <[email protected]> wrote
    in message
    > news:[email protected]...
    >> Murray,
    >>
    >> Here's an Update/Summary:
    >>
    >> 1. I have a MySQL database (localhost) I can see and
    manipulate via
    >> Navicat
    >> 2. In my site (in DW) I created a connection to that
    database. It tested
    >> successfully.
    >> 3. I created a recordset using that database. It
    tested successfully.
    >> 4. On a new page Insert > Application Objects
    > Insert Record > Record
    >> Insertion Form Wizard.
    >> 5. Save page and preview locally in IE6.
    >> 6. Input info in form and click Insert record.
    >> 7. Record IS added to table but every field is Null.
    >> 8. Errors for each form field:
    >> Warning: mysql_real_escape_string()
    [function.mysql-real-escape-string]:
    >> Access denied for user 'ODBC'@'localhost' (using
    password: NO) in
    >> F:\Webs\GoFreeFuel\TMP4r8sq1dpfl.php on line 8
    >>
    >> Warning: mysql_real_escape_string()
    [function.mysql-real-escape-string]:
    >> A link to the server could not be established in
    >> F:\Webs\GoFreeFuel\TMP4r8sq1dpfl.php on line 8
    >>
    >> As I can read from the database/table and the Insert
    record form DOES ADD
    >> a record it would seem I am connected to the db just
    unable to add data.
    >>
    >> What have I done wrong?
    >>
    >> Thanks.
    >> --
    >>
    >> Walt
    >>
    >>
    >> "Murray *ACE*"
    <[email protected]> wrote in message
    >> news:[email protected]...
    >>> OK - I think we will have to solve your database
    connectivity issues
    >>> first. What does your Connections file look
    like?
    >>>
    >>> --
    >>> Murray --- ICQ 71997575
    >>> Adobe Community Expert
    >>> (If you *MUST* email me, don't LAUGH when you do
    so!)
    >>> ==================
    >>>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>> ==================
    >>>
    >>>
    >>> "Walt F. Schaefer" <[email protected]>
    wrote in message
    >>> news:[email protected]...
    >>>>> LOL - you are interpreting my code MUCH
    too literally. Change this -
    >>>> It's only because I don't have a clue. Hence
    the need to use this
    >>>> beginner's tutorial.
    >>>>
    >>>> I replaced to code as instructed. No
    improvement. Error messages:
    >>>>
    >>>> Warning: mysql_real_escape_string()
    >>>> [function.mysql-real-escape-string]: Access
    denied for user
    >>>> 'ODBC'@'localhost' (using password: NO) in
    >>>> F:\Webs\cafe_php\TMPgayzl14jqr.php on line 8
    >>>>
    >>>> Warning: mysql_real_escape_string()
    >>>> [function.mysql-real-escape-string]: A link
    to the server could not be
    >>>> established in
    F:\Webs\cafe_php\TMPgayzl14jqr.php on line 8
    >>>>
    >>>> Warning: mysql_real_escape_string()
    >>>> [function.mysql-real-escape-string]: Access
    denied for user
    >>>> 'ODBC'@'localhost' (using password: NO) in
    >>>> F:\Webs\cafe_php\TMPgayzl14jqr.php on line 8
    >>>>
    >>>> Warning: mysql_real_escape_string()
    >>>> [function.mysql-real-escape-string]: A link
    to the server could not be
    >>>> established in
    F:\Webs\cafe_php\TMPgayzl14jqr.php on line 8
    >>>> INSERT INTO comments (FIRST_NAME, LAST_NAME)
    VALUES (NULL, NULL)
    >>>> --
    >>>>
    >>>> Walt
    >>>>
    >>>>
    >>>> "Murray *ACE*"
    <[email protected]> wrote in message
    >>>> news:[email protected]...
    >>>>> LOL - you are interpreting my code MUCH
    too literally. Change this -
    >>>>>
    >>>>> $insertSQL = sprintf("INSERT INTO
    comments (FIRST_NAME, LAST_NAME)
    >>>>> VALUES
    >>>>> (%s, %s)",
    >>>>> GetSQLValueString($_POST['FIRST_NAME'],
    "text"),
    >>>>> GetSQLValueString($_POST['LAST_NAME'],
    "text"));
    >>>>> $insert_rsEmails = sprintf("INSERT INTO
    tblcontactdata SET emailValue
    >>>>> =
    >>>>> %s", GetSQLValueString($filter_rsEmails,
    "text"));
    >>>>> die($insert_rsEmails);
    >>>>> $rsEmails =
    mysql_query($insert_rsEmails, $selectData) or
    >>>>> die(mysql_error()); // insert this email
    into the database
    >>>>>
    >>>>> mysql_select_db($database_connTownsend,
    $connTownsend);
    >>>>>
    >>>>> to this -
    >>>>>
    >>>>> $insertSQL = sprintf("INSERT INTO
    comments (FIRST_NAME, LAST_NAME)
    >>>>> VALUES
    >>>>> (%s, %s)",
    >>>>> GetSQLValueString($_POST['FIRST_NAME'],
    "text"),
    >>>>> GetSQLValueString($_POST['LAST_NAME'],
    "text"));
    >>>>> die($insertSQL);
    >>>>>
    >>>>> mysql_select_db($database_connTownsend,
    $connTownsend);
    >>>>>
    >>>>>
    >>>>> --
    >>>>> Murray --- ICQ 71997575
    >>>>> Adobe Community Expert
    >>>>> (If you *MUST* email me, don't LAUGH
    when you do so!)
    >>>>> ==================
    >>>>>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>>>>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>>>> ==================
    >>>>>
    >>>>>
    >>>>> "Walt F. Schaefer"
    <[email protected]> wrote in message
    >>>>>
    news:[email protected]...
    >>>>>> Murray,
    >>>>>>
    >>>>>> Here's all the PHP code that
    precedes the DOCTYPE *after* inserting
    >>>>>> the code you provided:
    >>>>>>
    >>>>>
    >>>>
    >>>>
    >>>
    >>
    >>
    >

Maybe you are looking for

  • RFC_ERROR_SYSTEM_FAILURE: Error in ASSIGN: Memory protection error.

    HI, I need an urgent help in this error. I am getting this error, while i am trying to access the R3 from portal. i.e While saving the employee info. ESS -> PERSONAL INFO -> PROJECT EXP-> SAVE (dump) error msg in portal Error while saving: com.sap.mw

  • Message Delivery in a Clustered Environment

    Hello, I was wondering if someone could give me a quick explanation/lesson on the following scenario. I have a two broker cluster (say, SERVERA and SERVERB where SERVERA is the master). Each server has a consumer connected to it, CONA and CONB respec

  • Organization Structure Transport

    Hello, Could you provide me steps as how to transport "Organization Management Structure" from one client to other client. If you have document pls send me at [email protected] Thanks in advance Anand

  • Noob Question: Where to start.

    I do not expect the esteemed members of this forum to hold my hand. I would much rather do things for myself. It is with that in mind that I ask this question. I was wondering if someone could point me in the direction of a basic tutorial for Web Ser

  • Nokia E7 HAve White Screen, a Did a 4 bottom's res...

    I restart with 8 sec, and still the same.... U know something about???