View Full Version : Selecting Things Automatically In Form From Previous Page...
02-18-2008, 12:33 AM
02-18-2008, 05:00 AM
The first form would go to a script that sets the cookie(s).
That script would redirect to the next form ... the user would
not see the "middle-man" where the cookie gets set because
it executes and re-directs. Pretty much the same thing as
a log-in script.
You could use the cookies to retain all of the 1st form variables.
Just remember that you can't set a cookie and use it in the same
script without a refresh in-between. It's that refresh (header) that
sets the cookie when the page is displayed. That is the purpose
for that script in-between.
All that being said (about cookies).... if your first form goes
The 2nd form can read variables that get sent from the 1st one.
don't complete the 2nd form. You can detect that if they return to
your site and let them know that the form was only 1/2 finished.
You can also choose to give them the option to "retain their settings"
or not (by using cookies)... example: "remember me the next time".
02-18-2008, 10:27 PM
I thought it would be cool
Rather than it being cool, I'd suggest that this is a requirement. If I click on a link to identify what I want to RSVP for, I don't want to have select again what I'm RSVPing for.
You can do it with just PHP.
Form your link like this:
Then in rsvp.php, you'd read $_GET['event_id'] while looping through all the events and compare the ID. If they are equal, echo 'selected="selected"'.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.