+ 2
Code for 'edit form' using Php and MySQL ..please?
can someone show me step by step process of how to make a edit form using php and mysql
3 Answers
+ 5
Edit what? Entries in the database? make a list of the entries and link them to your edit form. fill the fields with the data of the selected entry. after submitting use the update statement on the selected entry with the edited values. is that what you want to do?
+ 2
Are you talking about editing a user detail on ur site.. or a forum post..??
..any of which u could just create your form and create the input for the entries which you want to be edited on the database..
..use your normal if(isset($_POST).. Or any other depending on the forn method you used to get user inputted details..
..verify them.. e.g.. if(empty($Data)), or verify for specific data types so as to skip some sql errors.. e.g.. for INT.. you would need: if(!is_numeric($int)).. or other possible methods..
.. when done with input verification go ahead and use update statement to update(edit) the former entry in the database or table..
E.G UPDATE users SET username='codefreak', hobby='coding' WHERE uid = 2;
..you could edit and set your own values with user interaction using the roughly described method above đ
..hope its Helpful.. âş
+ 1
This is a single page form submit to Mysql code..
(due to not db access on Code Playground, you will get fatal error msg if you run it there)
https://code.sololearn.com/wRG5Cck4ilU4