Results 1 to 7 of 7

Thread: [RESOLVED] Pass Variables from One Page to Another

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member samsyl's Avatar
    Join Date
    Jun 2001
    Location
    London
    Posts
    338

    [RESOLVED] Pass Variables from One Page to Another

    i m trying to pass variable from one page to another but this variable stay empty

    here is my full code -

    page.php
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>page</title>
    </head>
    <body>
    
    <form name="form1" action="page1.php" method="post">
     <input type="text" name="var1" value="">
     <input type="submit" name="submit" value="submit">
    </form>
    
    </body>
    </html>
    page1.php
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>page1</title>
    </head>
    <body>
    
    <?
    $variable_from_page = $_POST['var1'];
    echo($variable_from_page);
    ?>
    
    </body>
    </html>
    Last edited by samsyl; May 29th, 2009 at 05:56 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width