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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pre-fill form field using URL

Status
Not open for further replies.

Krusher

IS-IT--Management
Jan 2, 2003
70
US
Folks,
I've seen this done before, but am not sure what the code looks like. I'd like to pre-populate an input text field on a form with data passed from the url. For example: I have a field called "name", and I'd like to populate the "name" field with the data "JohnSmith" by using the following url:


Any help on doing this would be greatly appreciated!

-K
 
<input type="text" value="<? echo $_GET['name'] ?>">

Cheers.

Chacal, Inc.[wavey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top