Baabu Posted February 29, 2008 Share Posted February 29, 2008 <?php //require 'db.php'; include ("functions.php"); include ("session.php"); //header("Location:http://localhost/cart/index.php"); //exit(); // echo $_POST["username"]; //echo "<br>"; // echo $_POST["upass"]; session_start(); if(AuthenticateUser($_POST["username"],$_POST["upass"])) { session_register("username"); $username=$_POST["username"]; echo $_SESSION["username"]; echo GetCartId(); //echo session_id(); //$uname=$_POST["username"]; //$upass=$_POST["upass"]; //setcookie("cookie_passwd",$upass); //setcookie("cookie_user",$uname); //echo "cookieset"; ?> <script language="JavaScript"> <!-- window.location.replace("list.php"); //--> </script> the above code is working fine i m not concerned abt security issues just want to knw when i redirect the page with java script no session or cookie variable is set on next page i.e list.php any suggestions?? Quote Link to comment Share on other sites More sharing options...
moon 111 Posted February 29, 2008 Share Posted February 29, 2008 You are being very vague. Please explain yourself. Quote Link to comment Share on other sites More sharing options...
Baabu Posted February 29, 2008 Author Share Posted February 29, 2008 well i just want to pass the session variable "username" after the authenticate functions comes true and then the page should redirect to list.php where i want the user name to be display but after the authenticate function goes true Quote Link to comment Share on other sites More sharing options...
conker87 Posted February 29, 2008 Share Posted February 29, 2008 Lets have a look at list.php Quote Link to comment Share on other sites More sharing options...
Baabu Posted February 29, 2008 Author Share Posted February 29, 2008 well i figured it out just placed session_start() just as the script starts and it all worked fineĀ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.