mercredi 15 avril 2015

Using file_get_contents to pre-populate form

Myself and a friend are creating a website to learn MVC, the site displays a list of database items and on each row there are two buttons (one to update and one to delete). We are trying to pre populate the update form when the user clicks the update button but are having some trouble.


Once the user clicks the update button a form will appear on the right of the screen allowing the user to update the row. To display the form we are using the following



$rightBox = file_get_contents( "templates/update_item_form.php" );


We are trying to populate the form with database entries, is it possible to send variables from the database to the form using the file_get_contents function? And if so how?


Aucun commentaire:

Enregistrer un commentaire