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

Pass data to another form

Status
Not open for further replies.

leegodden

IS-IT--Management
Apr 6, 2007
3
GB
Hi There
I have a search html page containig a form with three text fields which the user enters their search criteria. The form action takes them to another php page connected to mysql database and then shows them their results. On this php page there is an identical form so the user can search again without having to go back to the original search page.

I would like to display their original search entries in the three text fields from the search html page in the three text fields of the identical form on the php page.

Is there a way to do this with the onclick event for the submit button which calls a function

Any help would be much appreciated

Lee
 
Why bother using JS for this? Simply output the form fields pre-populated on your PHP page. E.g.:

Code:
<input type="text" name="field1" value="<?=$SomePHPVar1?>" />
<input type="text" name="field2" value="<?=$SomePHPVar2?>" />
<input type="text" name="field3" value="<?=$SomePHPVar3?>" />

Hope this helps,
Dan

Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top