Forum Moderators: coopster

Message Too Old, No Replies

page management

         

humming bird

8:46 am on May 9, 2005 (gmt 0)



hi!
i want to use the same page for login and messege that user is loged in for my site. how can i access the sumbitted data on on the same page.
i m building my site in PHP....

bye

ergophobe

6:53 pm on May 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You set the action to your form tag to come back upon itself

<form method="post" action="thispage.php">
<input type="text" name="username" value="">
<input type="submit" name="loginSumbit" value="Log In">
</form>

Then when you come back around, the values are in your $_POST array, like

if (isset($_POST['loginSubmit']))
{
echo "Welcome " . $_POST['username'];
}