Forum Moderators: coopster
When a user clicks on an image, I want to pass a designated value to subsequent pages, as part of the session. What is the best way to accomplish this?
I currently use this code for an actual login by individual...can I simply change the input type to 'hidden' and give it a value, and change the submit to 'click'?
<form action="Login2006menu.php?do=login" method="POST">
<p align="left"><font size="2" face="Arial"><u><b>MEMBER LOGIN:</b></u><br>
Username<br>
<input type="text" name="fusername"
size="20" maxsize="20"><br><font size="2" face="Arial">Password</font><br>
<input type="password" name="fpassword"
size="20" maxsize="20">
<input type="submit" name="log"
value="Enter">
</form>
<a href="example.php?u_id=<?php echo $value;?>"><img src="image.gif"></a>
But otherwise, the rest of your post is confusing...
Otherwise for SESSIONS if login is successful you could:
if (login == true)
{
$_SESSION['user_id'] = $userAuthenticate['user_id'];
}
[edited by: Pico_Train at 6:43 am (utc) on May 9, 2008]