Form Question

jadiebrown

New Member
I asked this question in a previous thread but I think I overloaded it with a whole lot of other questions. I still haven't got a reply on that so I have broken it down to this and would appreciate any help or suggestions.

I want to try and simplify it for myself. As I understand it there are three steps here:

1. The user sees a product on the website and wants more information. The user then clicks the "more info" button/link found next to the product.

2. A popup opens with text (Please enter your details and we will get back to you), three form fields (name, telephone number, email) and an "okay" and a "cancel" button.

3. Upon clicking "okay" (obviously "cancel" will just close the window) the form is emailed to me with all the information as well as the product code as the subject.

The first step involves the link <a href="infoform.php?pc=A001> where pc is the product code. If this is correct this means that the next file to be accessed by the server will be infoform.php. Should that be the file that opens in the popup (and thus contains the form fields as well)? Or should I rather link to infoform.html (which will open in the popup) and then when the user presses "okay", only then will the php script - infoform.php - run (sending the mail with the info and the product code).

If this is right then how do I communicate the value of pc through the process? Won't it get lost during infoform.html?
 

Logan

New Member
You can't do this with a normal html page (with the .html extension) as it involves sending a querystring value from one page to another which can only be done by server-side code. Your infoform (where you have the form fields) will have to request and store the querystring value (in your example pc=A001) so that this value can be sent to you in the mail (otherwise you won't know what product the customer is enquiring about).

Since I'm an asp developer, I can't give you example code, but the concept remains the same regardless of platform.

Hope this helps.
 
Top