I couldn't find a definite answer to this specific issue, basically what I have created is a HTML table which displays the contents of a database into columns and rows. Currently it is very simple as I am understanding how it works for now.
ID | First_Name | Last_Name | Bio | Created
ID = Primary Key for each row of the database.
I wish to be able to update an entire row of the database with one update command, if this is possible. Currently I am using:
$sql = "UPDATE databasetest.people SET First_Name = '".htmlspecialchars($_POST['FirstName'])."' WHERE people.ID = ".$_POST['edit'];
...where $_POST['FirstName']
is the first name, as defined by a form and $_POST['edit']
is the ID as defined by an initial form where the user selects "Edit User".
Is it possible to update multiple columns (first name, last name, bio and created at once) in this way?
EDIT: Very quick answers, thank you very much! I am not sure why I was downvoted, possibly because it was dumb? Sorry, still learning :)