I have a link on page that I want to use to pass a hard coded value from the link to a field on a form on another page. For example when someone clicks <a href="contact.html?Comments=Big%20Red%20Shoe">Email for More Info</a> I'd like the value "Big Red Shoe" to carry over and pre-populate the Comments field of the form on the contact.html page. Any thoughts on the best way to accomplish this?
In case anybody else ever needs this here's what I figured out. Link: <a href="contact.html?Comments=Big Red Shoe">Email for More Info</a> Text Field: <input type="text" name="Comments" value="<?= $_GET['Comments'] ?>"> Text Area: <textarea name="textfield" cols="30"><?= $_GET['Comments'] ?></textarea>
Sorry, been away from the computer this afternoon/evening. I was going to suggesting something along those lines Glad you found it!
hmmm, just for an add on, if it's ASP.NET, it would be.. a href="contact.aspx?Comments=Big%20Red%20Shoe">Email for More Info</a> ... string commentValue = Request.QueryString["Comments"]; lblTest.Text = commentValue; (make sure lblTest is already declared) Code (markup):