Jump to content



Recommended Posts

everytime I raed an article about sessions, I read it line by lne until I understanded as then at the end it says, this is no longer valid, do not use???session_register is deprecated$_SESSION['yadayada'] = "something I am storing"; is also no longer functional!!!!!!What is it that does work, How can I start a session and store the $myusername and $mypassword variables??

Link to comment
Share on other sites


some stuffif($count==1){session_start();$_SESSION['accountname'] = '$myusername';header("location:page2.php");}else{echo "Wrong Username or Password";}


<? $myusername= $_SESSION['accountname'];echo "Hello ". $myusername; ?>

The output is onlyHelloWhat am i doing wrong?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...