Passing results of SQL query to another page
Posted: Thu Feb 18, 2010 5:11 am
Hello all,
This is my first post and my first outing into the the world of web design and php so forgive me if i'm asking an obvious question.
i have 2 php pages at the moment.
a.php, calls a SQL query to retreive 4 fields (FirstName, Surname, PostCode and a Reference number) from a table based on an input from a form (Postcode). these fields are then displayed as a drop down menu (apart from the reference which i want to remain invisible to the user) from which you can select the one you want.
b.php, echos the 3 visible fields using echo $_GET["form_name"];
this works fine but i want to be able to pass the Reference number for the record that has been selected from the drop down list seperatly to b.php so i can use that as an input into another table of the sql database.
i'm sure this is possible but i just can't see how to do it.
help
S
This is my first post and my first outing into the the world of web design and php so forgive me if i'm asking an obvious question.
i have 2 php pages at the moment.
a.php, calls a SQL query to retreive 4 fields (FirstName, Surname, PostCode and a Reference number) from a table based on an input from a form (Postcode). these fields are then displayed as a drop down menu (apart from the reference which i want to remain invisible to the user) from which you can select the one you want.
b.php, echos the 3 visible fields using echo $_GET["form_name"];
this works fine but i want to be able to pass the Reference number for the record that has been selected from the drop down list seperatly to b.php so i can use that as an input into another table of the sql database.
i'm sure this is possible but i just can't see how to do it.
help
S