Updating a row in sql using php

Rated 4.93/5 based on 763 customer reviews

I have attached the final code so others can have the solution as well. PHP (FORM FILE) // Connect to server and select database.mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); $sql="SELECT * FROM $tbl_name WHERE date='4/5/2012'"; $result=mysql_query($sql); // Count table rows $count=mysql_num_rows($result); ? PHP (Processing Form) // Connect to server and select database.Please help with updating multiple rows with an array using PHP with my SQLi I have managed to do this OK with an INSERT query, but am struggling with the syntax for an UPDATE query.

So, we showed only one tile containing single user details.

But now, we should show multiple tiles, since we are updating multiple users at a time.

For that, we need to make two main changes with the edit_user.php, we have seen in PHP CRUD. So, on submitting this multiple user information, an array of user information for each user, will be passed to PHP code.

While implementing multiple rows update or delete, we need to follow some steps.

All the steps listed below are suitable for updating multiple rows.

Leave a Reply