#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    philippines
    Posts
    15
    Rep Power
    0

    help please.. phone browser issue or bad wml coding?


    hi! i was just wondering why i can get my code working on opera but get a "services: unknown reply on my nokia phone". is it a browser issue or just bad wml coding? will be posting my code, hoping any of you guys can help..

    PHP Code:
    <?php
      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\">";
      print 
    "<wml>";
      
    $access $_GET['access'];
      
    $login $_POST['login'];
      
    $StudNo $_GET['StudNo'];
      
    $id $_GET['StudNo'];
    //test if the user have passed through the login page. 
    if ($access != true)
     {
       print 
    "<card id=\"card0\" title=\"[ACCESS DENIED]\">";
       print 
    "<do type=\"prev\" label=\"Back\"><prev/></do>";
       print 
    "<p>Sorry, you are not authorized to view this page</p>";
       print 
    "<p><a href=login.php?login=true&access=false'>Back to Login Page</a></p>";
       print 
    "</card>";
       print 
    "</wml>";
       exit;
     }
    else
     {
       print 
    "<card id=\"card0\" title=\"[VIEW GRADES]\">";
       print 
    "<do type=\"prev\" label=\"Back\"><prev/></do>";
       print 
    "<p>View Grades:<br/></p>";
       print 
    "<p>Student#<br/><b>$id</b><br/></p>";
    ?>
            <table columns="2">
                <tr>
                    <td>Yr</td><td>Sem</td>
                </tr>
                <tr>
                    <td>1</td>
                    <td><a href="show_data.php?yr=1&amp;sem=1&amp;login=true&amp;access=true&amp;id=<? print "$StudNo";?>">1st</a></td>
                </tr>
                <tr>
                    <td>1</td>
                    <td><a href="show_data.php?yr=1&amp;sem=2&amp;login=true&amp;access=true&amp;id=<? print "$StudNo";?>">2nd</a></td>
                </tr>
                <tr>
                    <td>2</td>
                    <td><a href="show_data.php?yr=2&amp;sem=1&amp;login=true&amp;access=true&amp;id=<? print "$StudNo";?>">1st</a></td>
                </tr>
                <tr>
                    <td>2</td>
                    <td><a href="show_data.php?yr=2&amp;sem=2&amp;login=true&amp;access=true&amp;id=<? print "$StudNo";?>">2nd</a></td>
                </tr>
                <tr>
                    <td>3</td><td>
                    <a href="show_data.php?yr=3&amp;sem=1&amp;login=true&amp;access=true&amp;id=<? print "$StudNo";?>">1st</a></td>
                </tr>
                <tr>
                    <td>3</td>
                    <td><a href="show_data.php?yr=3&amp;sem=2&amp;login=true&amp;access=true&amp;id=<? print "$StudNo";?>">2nd</a></td>
                </tr>
                <tr>
                    <td>4</td>
                    <td><a href="show_data.php?yr=4&amp;sem=1&amp;login=true&amp;access=true&amp;id=<? print "$StudNo";?>">1st</a></td>
                </tr>
                <tr>
                    <td>4</td>
                    <td><a href="show_data.php?yr=4&amp;sem=2&amp;login=true&amp;access=true&amp;id=<? print "$StudNo";?>">2nd</a></td>
                </tr>
            </table>
        <?
        
    }

        print 
    "<p><a href=home.php?login=true&amp;access=true&amp;StudNo=$StudNo'>Back to Home</a></p>";
        print 
    "<p><a href='login.php?login=true&amp;access=false'>Back to Login page</a></p>";

    ?>
    </card>
    </wml>
    any help willbe greatly appreciated! this is the only page that's not working on my phone. weird..

    thanks in advance!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Location
    Beverly Hills
    Posts
    45
    Rep Power
    11

    The best way to solve these...


    Honestly, the best way to solve these is to look at the final WML output. I can sit here and puzzle through what the PHP will output, but I'm not nearly as good a parser as mod_php. To achieve this, use wget or curl. Test it out with both conditions set: logged in or not. Both wget and curl allow you to set arbitrary POST and GET variables and cookies so you should be able to emulate whatever the phone is doing. Do that, and you might immediately see the problem, or if not, post the output here and I'll see the problem.

    ---------
    WAP server software

IMN logo majestic logo threadwatch logo seochat tools logo