Codes for updating database in php
To delete data from database, you can use “DELETE” My SQL syntax.
Here also you want any reference field to delete data. Create a “delete.php” file, copy the below code and paste it inside file. If you find message like this “Data successfully delete.”.
mysql_real_escape_string() is intended to prevent a single or double quote from accidentally closing a SQL query and giving someone else the ability to insert their own code.
In this tutorial we will learn that how to “Select Insert Update Delete database operations in My SQL using PHP”.
As I can't get my host to update my My SQL today, I've looked for an alternative.
I've just added this into your page:- $lastname = stripslashes($lastname); after $lastname = mysql_real_escape_string(htmlspecialchars($_POST['lastname'])); and it works to maintain " or ' in the database text without the \ and shows " and ' in a web page without the \ , but I wonder if it has disabled the escape and therefore left me open to sql injection !!
With your example, if someone's name is D'Arcy Wentworth Thompson, (a real name) does that show as D'Arcy Wentworth Thompson in the database or as D\'Arcy Wentworth Thompson and when you view the name on a web page is it D\'Arcy Wentworth Thompson which would look odd?
I've now got my version of a booking form with output to a table on a webpage working as I want.