note 65973 added to ref.session

From: Date: Thu, 11 May 2006 05:52:15 +0000
Subject: note 65973 added to ref.session
Groups: php.notes 
Request: Send a blank email to php-notes+get-111109@lists.php.net to get a copy of this message
im new about php i made this code to pass variables to other website but i cant can you figure out whats wrong with this code <html> <head> <title>Sessions in PHP!</title> </head> <body> <form action="show.php" method="post"> <input type="text" name="name"><br> <input type="submit" name="submit" value="Submit my name!"> </form> </body> </html> <?php // Check to see if the form was submitted if (isset($_POST['submit'])) { // Because the form was submitted, do everything within this if // Create a session variable with the users name in it session_start(); $name = $_POST['name']; $_SESSION['user_name'] = $name; // echo '<a href="show.php">Next page</a>'; } ?> <html> <head> <title>Outputing sessions in PHP!</title> </head> <body> <?php session_start(); $name = $_SESSION['user_name']; echo 'Hello'.$_SESSION['user_name']; ?> </body> </html> ---- Server IP: 66.163.161.117 Probable Submitter: 210.16.53.82 ---- X-Spam-Status: No, hits=4.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER, HTML_30_40,HTML_MESSAGE autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/ref.session.php Edit -- http://master.php.net/note/edit/65973 Del: integrated -- http://master.php.net/note/delete/65973/integrated Del: useless -- http://master.php.net/note/delete/65973/useless Del: bad code -- http://master.php.net/note/delete/65973/bad+code Del: spam -- http://master.php.net/note/delete/65973/spam Del: non-english -- http://master.php.net/note/delete/65973/non-english Del: in docs -- http://master.php.net/note/delete/65973/in+docs Del: other reasons-- http://master.php.net/note/delete/65973 Reject -- http://master.php.net/note/reject/65973 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#111109) next »