This code has been tested on the most popular wap enabled nokia, erricson, seimens, pannasonic, samsung, motorola and sharp handsets

ive never heard of the samsung n370, so not sure...

but try adding a file in your root (begining) directory called

".htaccess" (without ")

and add the following lines:-

AddType text/vnd.wap.wml wml
AddType text/vnd.wap.wmlscript wmls
AddType image/vnd.wap.wbmp wbmp

Also, use a different emulator.. i find OpenwaveSDK no-good..

use the emulator @ www.wapsilon.com

You should find using this, it will tell you if your code is wrong and point out the errors... using the source button

    why is this soo hard??

    I got the a file called 1.wml in the root of my webpage, that file looks like:

    <?xml version="1.0"?><wml>
    <card>
    <p id="card1" title="firstpage" newcontext="true">
    <input align="center">
    Text 1:
    <br name="text1" size="10" />
    <input/>
    Text 2:
    <br name="text2" size="10" />
    <anchor/>
    <go name="text2" value="$(text2)"/>
    <postfield href="submit.wml" method="post">
    <postfield name="text1" value="$(text1)"/>
    </go>
    </anchor>
    </p>
    </card>
    </wml>

    then I got the .htaccess file also in the root of my site and that file looks like:

    AddType text/vnd.wap.wml wml
    AddType text/vnd.wap.wmlscript wmls
    AddType image/vnd.wap.wbmp wbmp

    I used the emulator from www.wapsilon.com and I get an error message that says:

    The webserver told me that 406 No acceptable objects were found

    any idea what's going on? I'm useing IIS on windows xp pro, along with php and mysql set up.

    thanks!

      Well to start with, your code is !Totaly! wrong.
      (You dont have the proper header)
      and the rest is all wrong.....

      I got the a file called 1.wml in the root of my webpage, that file looks like:

      <?xml version="1.0"?><wml>
      <card>
      <p id="card1" title="firstpage" newcontext="true">
      <input align="center">
      Text 1:
      <br name="text1" size="10" />
      <input/>
      Text 2:
      <br name="text2" size="10" />
      <anchor/>
      <go name="text2" value="$(text2)"/>
      <postfield href="submit.wml" method="post">
      <postfield name="text1" value="$(text1)"/>
      </go>
      </anchor>
      </p>
      </card>
      </wml>

      1st, Start by making a basic page that shows "Start page"

      Do this by copying this, following code EXACTLY >>

      Name this file "index.wml"

      <?xml version="1.0"?>
      <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
      <wml>
        <card id="card1" title="firstpage" newcontext="true">
          <p align="center">
      
        Start Page
      
      </p>
        </card>
      </wml>

      Tell me what you get (on wapsilon and on phone)

      "bastien" - it doesn't matter what server your using, if you have a .htacess file it will overide it.
      (believe me i've been building wap sites for 4yr)

      If you do use the link bastien supplied, you only need to do "stage 2" because your not using ASP (which stage 1 configues)

        really, as far aas I knew, htaccess is an apache/unix type config file whereas iis uses differing mechanisms to do the same thing..even googling the tpoic i can't find anything that says that htaccess works with iis

        if you have a link, please post it

          ok... now it just says

          Start Page

            right so now it works, try the following >>

            <?xml version="1.0"?>
            <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
            <wml>
              <card id="card1" title="firstpage" newcontext="true">
                <p align="center">
                  Text 1:
                  <input name="text1" size="10"/>
                  <br/>
                  Text 2:
                  <input name="text2" size="10"/>
                  <br/>
                  <anchor>
                    Submit
                    <go href="submit.wml" method="post">
                      <postfield name="text1" value="$(text1)"/>
                      <postfield name="text2" value="$(text2)"/>
                    </go>
                  </anchor>
                </p>
              </card>
            </wml>
            

              THAT WORKS!!!

              I know I'm asking alot of question but one more 🙂

              on the next page (submit.wml) how could I use php to display something based on what was entered? I tried to make .wml files link to the phpisapi but then I couldn't display the page in the phone anymore....

                Say for instance, your making a login page (which i think you are)

                your login page would look like this >>

                Index.wml


                <?xml version="1.0"?>
                <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
                <wml>
                  <card id="index" title="Index page" newcontext="true">
                    <p align="center">
                      Username:
                      <input name="user" size="10"/>
                      <br/>
                      Password:
                      <input name="pass" size="10"/>
                      <br/>
                      <anchor>
                        Submit
                        <go href="main.wml" method="post">
                          <postfield name="user" value="$(user)"/>
                          <postfield name="pass" value="$(pass)"/>
                        </go>
                      </anchor>
                    </p>
                  </card>
                </wml>
                

                Then maybe it would goto a main page >>

                Main.wml


                <?xml version="1.0"?>
                <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
                <wml>
                  <card id="main" title="Main page" newcontext="true">
                    <p align="center">
                      <br/>
                      Welcome $user
                      <br/>
                      Your other content
                      <br/>
                    </p>
                  </card>
                </wml>
                

                As you'll see ive added the line "Welcome $user" this ($user)
                calls the infomation added in the text box (user) on the index.wml page,

                and also you will notice i havent changed the page to main.php,
                i've left it as main.wml, this is because wml will reconise the $ function

                  ok... I got that to work... but I wanted to grab info from a database and run some other php commands on it. Is it possable to do that?

                    yes its possable to do, not sure how to run it on a ISS server though???

                    plus, you'll have to learn PHP first, its alot harder than WML... lol😃

                      I got that covered... i know php 😉 , my site already runs on it. just want to show some data on the cell.

                      anyone know where i can findout how to set up IIS php and wml?

                      thanks

                        Got it!! Thanks for the links

                        looks like when doing wml in php the first you have to print is

                        <?php
                        header('Content-type: text/vnd.wap.wml');
                        echo '<?xml version="1.0" encoding="iso-8859-1"?>' . "\n";
                        ?>
                        

                        Here is what my working code looks like, now I can build in it from there

                        index.php

                        <?php
                        header('Content-type: text/vnd.wap.wml');
                        echo '<?xml version="1.0" encoding="iso-8859-1"?>' . "\n";
                        ?>
                        
                        <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
                        <wml>
                          <card id="card1" title="firstpage" newcontext="true">
                            <p align="center">
                              Email:
                              <input name="email" size="50"/>
                              <br/>
                              Password:
                              <input name="pass" size="20"/>
                              <br/>
                              <anchor>
                                Submit
                                <go href="show.php" method="post">
                                  <postfield name="email" value="$(email)"/>
                                  <postfield name="pass" value="$(pass)"/>
                                </go>
                              </anchor>
                            </p>
                          </card>
                        </wml>
                        

                        Show.php

                        <?php
                        header('Content-type: text/vnd.wap.wml');
                        echo '<?xml version="1.0" encoding="iso-8859-1"?>' . "\n";
                        ?>
                        
                        <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
                        <wml>
                          <card id="main" title="Main page" newcontext="true">
                            <p align="center">
                              <br/>
                              Welcome <?php echo $_POST['email']; ?>
                              <br/>
                        
                          <br/>
                        </p>
                          </card>
                        </wml>
                        

                        Thanks for all your help everyone!!

                          You'll find this header more reliable... >>>>>

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

                          Together it will look like this >>>
                          Index.php


                          <?header("Content-type: text/vnd.wap.wml")
                          ;echo '<?xml version="1.0"?>';?>
                          <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
                          
                          <wml> 
                            <card id="card1" title="firstpage" newcontext="true"> 
                              <p align="center"> 
                                Email: 
                                <input name="email" size="50"/> 
                                <br/> 
                                Password: 
                                <input name="pass" size="20"/> 
                                <br/> 
                                <anchor> 
                                  Submit 
                                  <go href="show.php" method="post"> 
                                    <postfield name="email" value="$(email)"/> 
                                    <postfield name="pass" value="$(pass)"/> 
                                  </go> 
                                </anchor> 
                              </p> 
                            </card> 
                          </wml> 
                          

                          Show.php


                          <?header("Content-type: text/vnd.wap.wml")
                          ;echo '<?xml version="1.0"?>';?>
                          <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
                          
                          <wml> 
                            <card id="main" title="Main page" newcontext="true"> 
                              <p align="center"> 
                                <br/> 
                                Welcome <? echo $_POST['email']; ?> 
                                <br/> 
                          
                            <br/> 
                          </p> 
                            </card> 
                          </wml>

                          Also you might need to add this to your .htacess file >>

                          AddType application/x-httpd-php3 .php3 .php .phtml .wml

                            Write a Reply...