Forum Moderators: coopster
Here is the situation...
If a user clicks on a link ('abc123' for example) I want to insert into my database some predefined information about 'abc123' - I have assigned a value that is echoed in future pages for 'abc123'.
So, what I need is some mechanism to, when a user clicks 'abc123', have a pre-defined username and password be entered into the database. I need this so future pages can utilize the session values.
I am not sure if I am very clear what I am looking for.
user clicks link
you auto log them in based on what link
you save that info to their session for later use
should be pretty straight forward
they click
you select data from db based on which link
add the info to the session
you can echo it from the session later
was there some specific part of it that was giving you trouble?
I have a drop down menu that consists of a number of choices...
"A"
"b"
"c"
etc.
a user selects the choice, hits a submit button. previously, i have used a simple html form that would apss the option value to the next page.
Here is what i am looking to do now...
using the same drop down menu, when the selection is made, a session logname is created that remains for each page.
i think i have a solution, and will try to implement it, but what i am trying to understand is how to i get the selection to be entered into the db?
does that help?
<select name="schools" id="schools">
<option value="na">Youth Organizations</option>
<option value="supportbigred20">------------------------------------------------------------------------------</option>
<option value="supportbigred301-20">AD&JP Fund</option>
<option value="supportbigred302-20">CYHA</option>
</select>
Here is a form that I use(and it works) to submit text-entered info to my DB...so my drop down action needs to go to Login2006.php and the option value needs to pass both username and password. This is where I run into issues...
<form action="Login2006.php?do=login" method="POST">
<p align="left"><b>Username</b> <input type="text" name="fusername"
size="15" maxsize="20">
<b>Password</b> <input type="password" name="fpassword"
size="15" maxsize="20">
<br>
<input type="submit" name="log"
value="Enter" style="float: left">