×

Discussion Board

Results 1 to 2 of 2

Thread: XHTML+php issue

  1. #1
    Registered User
    Join Date
    Aug 2006
    Posts
    1

    XHTML+php issue

    Hi
    I've developed an XHTML-MP/php dynamic wab site
    ,which uses global variables in php,but i find php global variables(user defined) is not accessible from another pages in the wap site as the traditional web site HTML+PHP ,this is my code:

    <?php
    header('Content-type: application/vnd.wap.xhtml+xml');
    echo '<?xml version="1.0"?' . '>';
    global $USER;
    $USER=5;
    ?>
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    </head>

    <body>

    <form action="display.php" method="post" >
    <p>

    <input name="btnSubmit" type="submit"/><br/>

    </p>
    </form>
    </body>
    </html>

    //////////////display.php///////////

    <?php
    header('Content-type: application/vnd.wap.xhtml+xml');
    echo '<?xml version="1.0"?' . '>';
    global $USER;
    ?>
    <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    </head>

    <body>
    <?php
    echo $USER; ?>
    </body>
    </html>

    ///output of display.php(No thing)
    please help

  2. #2
    Registered User
    Join Date
    Nov 2004
    Posts
    21

    Re: XHTML+php issue

    Have you tried using $_SESSION instead?

Similar Threads

  1. PHP + XHTML: Opens with Nokia notepad
    By xonsuns in forum Browsing and Mark-ups
    Replies: 2
    Last Post: 2010-12-17, 17:26
  2. Replies: 0
    Last Post: 2005-02-17, 06:15
  3. php and xhtml
    By zac123 in forum Browsing and Mark-ups
    Replies: 2
    Last Post: 2005-01-16, 04:00
  4. xhtml con php
    By amedrano in forum Browsing and Mark-ups
    Replies: 2
    Last Post: 2003-11-18, 15:32
  5. refresh issue with conversion of wml to xhtml
    By jonnystewart in forum Browsing and Mark-ups
    Replies: 2
    Last Post: 2003-08-29, 09:33

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×