0
How make update data using modal?
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";
}
0
hi vincent,ok i try your sugest