0

How make update data using modal?

26th Dec 2018, 5:42 AM
Junaedi
Junaedi - avatar
2 Answers
+ 2
Hi Junaedi, One way to accomplish this you can use this modal snippet, edit to your requirements: https://code.sololearn.com/W454f7IK92kq/?ref=app Implement a form to the modal. <formĀ action="" method="post"> Name:Ā <inputĀ type="text" name="name"><br/> Id:Ā <inputĀ type="text" name="id"><br/> <inputĀ type="submit" name="submit"> </form> Use at final PHP to update the row values. If(isset(_POST['submit'])){ $name = $_POST['name']; $id = $_POST['id']; $sql = "UPDATE MyTable SET name=$name WHERE id=$id"; }
5th Jan 2019, 12:53 AM
🌓Vincent Berger🌓
🌓Vincent Berger🌓 - avatar
0
hi vincent,ok i try your sugest
5th Jan 2019, 2:17 AM
Junaedi
Junaedi - avatar