Thread: WAP XML error

    #1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2005
    Posts
    641
    Rep Power
    30

    WAP XML error


    Ok, I have a basic WAP error, but can see anything wrong with the code.

    XML Parsing Error: not well-formed
    Location: http://mobile.commusoft.co.uk/wmldiary.php
    Line Number 7, Column 88:

    <a href="wmlsearchform.php">back</a><br /><a href="viewdiary.php?clientid=27&addressid=87&jobid=257">morning 06:15:00 This is done</a><br />
    ----------------------------------------------------------------------------------------------^

    PHP Code:
    echo '<a href="wmlsearchform.php">back</a><br />';
            
    $sqldiary mysql_query("SELECT dclientid, daddressid, djobid, dtime, dextime, dreason
                                                FROM diary d, groupemployee ge
                                            WHERE d.dcompanyid=
    $companyid
                                            AND d.ddate=
    $today
                                            AND d.dgroupid=ge.gregrnid
                                            AND ge.greuid=
    $uid
                                            ORDER BY d.dtime DESC, d.dextime ASC"
    ) or die(mysql_error());
                                
                            if(
    mysql_num_rows($sqldiary) == 0){    
                                
                                echo 
    "No Diary Events";
                                
                            }else{
                                while(
    $d mysql_fetch_array($sqldiary)){
                                        
    $clientid $d['dclientid'];
                                        
    $addressid $d['daddressid'];
                                        
    $jobid $d['djobid'];
                                        
    $dtime $d['dtime'];
                                        
    $dextime $d['dextime'];
                                        
    $dreason $d['dreason'];
                                        
                                        echo 
    "<a href=\"wmlviewdiary.php?clientid=$clientid&addressid=$addressid&jobid=$jobid\">$dtime $dextime $dreason</a><br />";
                                
                                }
                            } 
  2. #2
  3. Retired
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Finland
    Posts
    9,115
    Rep Power
    2498
    Is that block of code contained in anything?

    It needs to be within at least paragraph tags dependant on what version of wap you are using?

    Also your & need to be &amp; or &#38;
    Last edited by jabba_29; November 22nd, 2006 at 10:07 AM.

    Cheers,
    Jamie

    >_ My Music Blog | Losing weight @notsoheavyblog | My Tweets

    __________________

    Let the might of your compassion arise to bring a quick end
    to the flowing stream of the blood and tears .....
    Please hear my anguished words of truth.

    __________________
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2005
    Posts
    641
    Rep Power
    30
    PHP Code:
    <?php
    //Where to submit the form.
    $target 'wmldiary.php';
    //$target = 'http://localhost/eheating/search.php';

    // END CONFIG


            
    include_once '../eheating/includes/session.php';
            include_once 
    '../eheating/includes/config.php';

    header('Content-type: text/vnd.wap.wml');
    //This has to be printed via PHP in case short tags are on.
    echo '<?xml version="1.0" encoding="utf-8"?>';

        
    $enter 1;
        include_once 
    '../eheating/includes/secure.php';

    ?>

    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
    <wml>
        <card id="search" title="CommuSoft Diary">
            <p>

        <?php

        
    if ($isloggedin == 1){
            
            
    $today date("Ymd");
            
            echo 
    '<a href="wmlsearchform.php">back</a><br><br>';
            
    $sqldiary mysql_query("SELECT dclientid, daddressid, djobid, dtime, dextime, dreason
                                                FROM diary d, groupemployee ge
                                            WHERE d.dcompanyid=
    $companyid
                                            AND d.ddate=
    $today
                                            AND d.dgroupid=ge.gregrnid
                                            AND ge.greuid=
    $uid
                                        ORDER BY d.dtime DESC, d.dextime ASC"
    ) or die(mysql_error());
                                
                            if(
    mysql_num_rows($sqldiary) == 0){    
                                
                                echo 
    "No Diary Events";
                                
                            }else{
                                while(
    $d mysql_fetch_array($sqldiary)){
                                        
    $clientid $d['dclientid'];
                                        
    $addressid $d['daddressid'];
                                        
    $jobid $d['djobid'];
                                        
    $dtime $d['dtime'];
                                        
    $dextime $d['dextime'];
                                        
    $dreason $d['dreason'];
                                        
                                        echo 
    '<a href="wmlviewdiary.php?clientid='.$clientid.'&amp;addressid='.$addressid.'&amp;jobid='.$jobid.'">'.$dtime.' '.$dextime.' '.$dreason.'</a><br>';
                                
                                }
                            }
            

        }else{
            echo 
    'Please <a href="http://mobile.commusoft.co.uk">log in</a>';
        }
        
    ?>        
            
            </p>
        </card>
    </wml>
    I know the whole script is a bit longer, but it may help
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    May 2005
    Posts
    641
    Rep Power
    30
    next

    Comments on this post

    • andymoo disagrees : that's just freaking ignorant
  8. #5
  9. Retired
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2002
    Location
    Finland
    Posts
    9,115
    Rep Power
    2498


    What is that supposed to mean?
    What have you tried? You didn't appear to take any notice of my first reply.
    What is wrong now? Only you know.
    Is your query returning any results?
    Is it correct, you have no error trapping...

    Also: <br> is invalid, should be <br />

    I would try something like
    PHP Code:
    <?php
    // your code until you print out the link
    $link htmlentities('wmlviewdiary.php?clientid='.$clientid.'&addressid='.$addressid.'&jobid='.$jobid);
    echo 
    '<a href="'$link .'">'.$dtime.' '.$dextime.' '.$dreason.'</a><br />';
    // rest of code

    Comments on this post

    • JMorjaria agrees : appologise for the next comment, it was a mistaken post, I wanted to delete it but dont have permissions, the error was
      like you said. Thankyou :)

    Cheers,
    Jamie

    >_ My Music Blog | Losing weight @notsoheavyblog | My Tweets

    __________________

    Let the might of your compassion arise to bring a quick end
    to the flowing stream of the blood and tears .....
    Please hear my anguished words of truth.

    __________________

IMN logo majestic logo threadwatch logo seochat tools logo