i have two programmes
FORM.PHP
WELCOME.PHP
but it gives me output wrong session id.
i want to know whether this is a true condition or not , kindly inform if any syntactical error in it
FORM.PHP
Code:
<?PHP session_start(); ?> <html> <body> <form action="welcome.php" method="post"> firstname: <input type="text" name="fname" /> <input type="submit" /> </form> </body> </html>
Code:
<?php session_start(); if($_COOKIE[' PHPSESSID']=$_SESSION['PHPSESSID']) { echo $_POST["fname"]; } else { echo"wrong session id"; } ?>
Code:
($_COOKIE[' PHPSESSID']=$_SESSION['PHPSESSID'])
Comment