Auto Populate HTML Form Value with SQL Data
Posted: Sun Oct 19, 2008 4:15 pm
Hello,
I have a movie database that I am working on slowly. I created a search function, and another function that allows me to add data into the database. All works great. I would like to now create a form where I can update or delete the information as needed. For example, when I search for "Lord of the Rings", the movie title comes up in my search. When I click on it, I would like it to take me to form2.php that I created that has all the fields (Movie Title, Media Type etc...) and I would like those field auto populated with the information from the link i clicked. ID=2
When I am in the form and do <?php echo "$ID" ?> for the value, that works fine and displays the correct value, but the other values do not seem to be passed $TITLE, $MEDIA etc..
Essentially, I would like to be able to click update, and update the data, or delete to delete the data. Any help is appreciated. Thank you!!
I have a movie database that I am working on slowly. I created a search function, and another function that allows me to add data into the database. All works great. I would like to now create a form where I can update or delete the information as needed. For example, when I search for "Lord of the Rings", the movie title comes up in my search. When I click on it, I would like it to take me to form2.php that I created that has all the fields (Movie Title, Media Type etc...) and I would like those field auto populated with the information from the link i clicked. ID=2
When I am in the form and do <?php echo "$ID" ?> for the value, that works fine and displays the correct value, but the other values do not seem to be passed $TITLE, $MEDIA etc..
Essentially, I would like to be able to click update, and update the data, or delete to delete the data. Any help is appreciated. Thank you!!