Hi, I need to modify something that is pulled from a database. I know how to pull the item out of the database with php and then have the field all set and ready to go in a form field.
Can I use the same exact php with additions added to it send the item back to the database again, after it is modified?
In other words can you use a select query and an insert query with the same php code?
Thank you very much.
question about modifying something
Moderator: General Moderators
Re: question about modifying something
If I understand what you're trying to do correctly, you can just pull the info from your database with the SELECT query, and use the information from the SELECT query to populate the form fields. Then just make the action of the form point to a PHP file with an UPDATE query that simply utilizes the variables from the form. After the UPDATE query, just return the user to the form, and the fields should update to reflect the new information automatically, if you set it up right.Nicole wrote:Hi, I need to modify something that is pulled from a database. I know how to pull the item out of the database with php and then have the field all set and ready to go in a form field.
Can I use the same exact php with additions added to it send the item back to the database again, after it is modified?
In other words can you use a select query and an insert query with the same php code?
Thank you very much.