passing username var to the next page using sessions
Posted: Mon Dec 08, 2003 1:52 pm
ok, this is gonna sound so n00by
basically i have this on logged_in/index.php
this is used for showing the variable
and i have this on the page before,the login page,
now whatever happens it will not pass teh variable and just leaves a blank space where it shouold be, when i turn register_globals on, it works after amending the code, but i want it designed so that it works when its turned off, can anyone explain why it isnt working
please note : i have no other code on the login page, in case you need something that defines what to pass which i dont thinbk is the case.
currently i use cookies and it works properly but i need to use sessions to do it because i need to display some more info from there session and dont want to set cookies for no reason
Thanks
basically i have this on logged_in/index.php
this is used for showing the variable
Code: Select all
<?php
echo $_POST['username'];
echo $_POST['password'];
?>Code: Select all
<form action="" method="post" name="login_form" id="login_form">
username
<input name="username" type="text" id="username">
<br>
password
<input name="password" type="password" id="password">
<br>
<input name="submit_button" type="submit" id="submit_button" value="login">
</form>please note : i have no other code on the login page, in case you need something that defines what to pass which i dont thinbk is the case.
currently i use cookies and it works properly but i need to use sessions to do it because i need to display some more info from there session and dont want to set cookies for no reason
Thanks