Reputation: 23322
I'm trying to set up a website that has a list of products. Under each product is a button that says "Request a Quote". When they click that button, I want them to be taken to the contact page with the subject line filled out with the product ID and a predetermined string (i.e. "Quote Request").
How can I set up the "Request a quote button" to send the data and get the subject line in the contact page to read it?
I'm sorry if it's an obvious one, I'm pretty new at this and I'm doing this as a for-learning project.
Upvotes: 0
Views: 112
Reputation: 244
Maybe it helps : http://www.phpriot.com/articles/multi-step-wizards
You need to pass the parameters by GET or POST method to your contact form first, then catch them in contact.php and then display them as @InGodITrust said. In other ways, you mat use some Wizard Controls or you can do it yourself!
Upvotes: 0
Reputation: 5399
You can do it with appending the subject into the GET string.
contact.php?subject=thus+is+the+subject
Then on the contact page you can get it with $_GET['subject']
;
<input type="text" value="<?php echo $_GET['subject']; ?>" />
Upvotes: 2