Thread: PHP and WAP

    #1
  1. No Profile Picture
    ...try and try again
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Lake Forest, CA, USA
    Posts
    182
    Rep Power
    15
    I have created the following wml/php... can anyone suggest why it is not working?

    Using the GELON simulator all I can see is the title "front", am I to assume that the php is being read correctly, if so then why does it not display the rest of the text?

    The Deck-It previewer says there is an error - I can't find it!

    Thanks in advance, Sharky.

    <?php
    // send wml headers
    header("Content-type: text/vnd.wap.wml");
    echo("<?xml version="1.0"?>");
    echo("<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">");

    echo("<wml>");
    echo("<card id="php page" title="front">");
    echo("<p>");
    echo("PHP Working<br/>");
    echo("</p>");
    echo("</card>");
    echo("</wml>");
    ?>
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    Well Sharky,
    You have a quote problem ...
    at least you had, until I came to help

    correct code:
    <?php
    // send wml headers
    header("Content-type: text/vnd.wap.wml");
    echo("<?xml version="1.0"?>");
    echo("<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">");

    echo("<wml>");
    echo("<card id="php page" title="front">");
    echo("<p>");
    echo("PHP Working<br/>");
    echo("</p>");
    echo("</card>");
    echo("</wml>");
    ?>

    and if this dos not work, you have a problem with your server, cos on my server it works fine.

    ------------------
    **********************
    Holev Ezim
    webmaster@builder.co.il
    **********************
  4. #3
  5. No Profile Picture
    ...try and try again
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Lake Forest, CA, USA
    Posts
    182
    Rep Power
    15
    Thanks for the reply Holev, however, I escaped my quotes and now I don't even see the title in either of the simulators, so I thinking this maybe a problem with my server (they are already looking into this). Can you give me the link to your wml test so I can see for myself how it works and if the simulators see it as working?

    Thanks
    Sharky
  6. #4
  7. No Profile Picture
    ...try and try again
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Lake Forest, CA, USA
    Posts
    182
    Rep Power
    15
    Okay, I figured it out.

    As usual, the most obvious error was completely overlooked.

    I hadn't changed the extension of my wml file to php....d'oh.

  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Posts
    36
    Rep Power
    15
    This is interesting.. How would I program in WAP and also is there an emulator where I could test my code?

    ------------------
    Adam Kling
    President
    MyBizHosting
    http://www.mybizhosting.com

    Everybody that signs up with us becomes a reseller. Get additional accounts at discount!

  10. #6
  11. No Profile Picture
    ...try and try again
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Lake Forest, CA, USA
    Posts
    182
    Rep Power
    15
    Adam,

    "How would I program in WAP.."

    WAP requires wml, a version of xml, to work. For a good tutorial go to wapdrive.com

    "..is there an emulator where I could test my code?"

    I use two emulators. One can be found on the site above which uses the GELON emulator.
    I also downloaded Deck-It, I think I got this from cnet.com. Deck-It tends to give me better feed back on the errors and it also gives the correct display for php.

    I also recommend the wysiwyg editor on wapdrive.

    As far as the capabilities and limits of using php and SQL... I'm still testing.

    Hope this helps.
    Sharky.

Similar Threads

  1. WAP and Unix
    By brianhu in forum Beginner Programming
    Replies: 1
    Last Post: February 5th, 2004, 04:31 PM

IMN logo majestic logo threadwatch logo seochat tools logo