Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Posting variables from PHP to HTML

Status
Not open for further replies.

Silverhand

Technical User
Jul 28, 2006
2
DE
I have a PHP-page, which is supposed to redirect the user into a HTML-page and send a couple of variables to be inserted into a form on the page.

How do I post the variables?
 
Code the HTML page as a PHP page and after the link to the page in the first page add:

?[variable1_name]=[variable1_value]&[variable2_name]=[variable2_value]

so if the new page is page2.html, code it as page2.php and make the link in page1.php as:

<a href=&quot;page2.php?name1=$name1&name2=$name2>link text</a>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top