|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Passing a hidden variable to another html page
OK, you probably can't do this, but if you can I'm sure one of you can help me. I'll keep it simple. I have 3 html pages, one for each product. There's a button on each page that takes you to another html page with a form on it, which sends the information to a php sendmail script. I need to be able to pass a hidden variable from the product pages, into a hidden field in the form, which will then place that info into the email that the sendmail script sends me. The hidden variable will tell me which of the 3 products the customer is interested in, depending on which product page they're going to the form page from. Can I do that or does at least one of the html pages have to be a php page? Now, if someone can help me I have NO knowledge of php at all, so I'll need the whole solution, not just "add this line, echo=('variable/n'). That should do it." I won't know where to put it. Sorry to be such a pain, but I'd appreciate any help anybody can give me.
M7 |
|
#2
|
|||
|
|||
|
A simpler way of putting it
How do I pass a hidden variable on one html page to another html page with a form on it? The form has spaces for name, company, phone number, etc. which is sent to a php sendmail script on the server which emails the information to me. I need to have that hidden variable included in the email. What would be the complete code for the first html page, and what code do I put inside form of the second page to hold that information and pass it to the sendmail script?
|
|
#3
|
||||
|
||||
|
tried an <input type="hidden" /> tag?
It works the same as a normal input field, only it isn't shown. Simply assign a name and value, and you can read them from the POST vars on the next page. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > Passing a hidden variable to another html page |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|