joomlavideos Posted April 3, 2011 Report Share Posted April 3, 2011 Hi, My client would like me to build a simple PHP form for viewers to select items they would like more information on. No problem. They would like the form to be pre-selected with an item they just selected on a previous page. In other words, if they were looking at a vacation page describing a trip to vegas, and they click "buy now", (btw, there will be no shopping cart) or "more info", the subsequent form on the resulting page would have that vacation preselected. This is requested in an effort to keep the clicks to a minimum for the user. Couldn't this be done by attaching an "ID" to the "more info" button on what ever page they came from? Your help is appreciated. Quote Link to comment Share on other sites More sharing options...
falkencreative Posted April 3, 2011 Report Share Posted April 3, 2011 Yeah, using an ID is probably the easiest way. Pass the id in the URL yoursite.com/form.php?id=2 and then in the form.php page, get the id from the URL using $_GET (make sure it is a valid int, otherwise people could edit the URL to add their own values instead) and use it to select the correct items. Quote Link to comment Share on other sites More sharing options...
jstern Posted April 4, 2011 Report Share Posted April 4, 2011 I would think about looking into using Cache if it's information your passing along like your example. Quote Link to comment Share on other sites More sharing options...
joomlavideos Posted July 1, 2011 Author Report Share Posted July 1, 2011 Thanks for your replies. I did end up passing an ID via the link and used the $_GET to both, show the "vacation" name visibly on the form, and also to pass the ID through the form data using a hidden input! So thanks for your help. P.S. @Ben - your logo is VERY cool! Quote Link to comment Share on other sites More sharing options...
falkencreative Posted July 2, 2011 Report Share Posted July 2, 2011 @Ben - your logo is VERY cool! Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.