php_self

how do i call data from the database and add & edit with php_self function

Check to see if the form using php_self has been sent.

if(isset($_POST[‘submit’]))

If it is set, update the database.
If it isnt, display the form for information to be edited.

Use the information from the database to pre-fill forms in order to edit, and again, check if php_self has been sent.

If it has, edit the database information with $_POST
If not, display the form with the database information in its fields.

Sponsor our Newsletter | Privacy Policy | Terms of Service