<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.twig.es/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.twig.es/index.php?action=history&amp;feed=atom&amp;title=PHP_mysqli_real_escape_string%28%29_Function</id>
		<title>PHP mysqli real escape string() Function - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.twig.es/index.php?action=history&amp;feed=atom&amp;title=PHP_mysqli_real_escape_string%28%29_Function"/>
		<link rel="alternate" type="text/html" href="https://wiki.twig.es/index.php?title=PHP_mysqli_real_escape_string()_Function&amp;action=history"/>
		<updated>2026-05-06T13:18:52Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.0</generator>

	<entry>
		<id>https://wiki.twig.es/index.php?title=PHP_mysqli_real_escape_string()_Function&amp;diff=2153&amp;oldid=prev</id>
		<title>George2: Created page with &quot;&lt;source lang=&quot;php&quot;&gt;  &lt;?php $con=mysqli_connect(&quot;localhost&quot;,&quot;my_user&quot;,&quot;my_password&quot;,&quot;my_db&quot;);  // Check connection if (mysqli_connect_errno()) {   echo &quot;Failed to connect to My...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.twig.es/index.php?title=PHP_mysqli_real_escape_string()_Function&amp;diff=2153&amp;oldid=prev"/>
				<updated>2015-07-01T14:05:35Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;  &amp;lt;?php $con=mysqli_connect(&amp;quot;localhost&amp;quot;,&amp;quot;my_user&amp;quot;,&amp;quot;my_password&amp;quot;,&amp;quot;my_db&amp;quot;);  // Check connection if (mysqli_connect_errno()) {   echo &amp;quot;Failed to connect to My...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
$con=mysqli_connect(&amp;quot;localhost&amp;quot;,&amp;quot;my_user&amp;quot;,&amp;quot;my_password&amp;quot;,&amp;quot;my_db&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
// Check connection&lt;br /&gt;
if (mysqli_connect_errno()) {&lt;br /&gt;
  echo &amp;quot;Failed to connect to MySQL: &amp;quot; . mysqli_connect_error();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// escape variables for security&lt;br /&gt;
$firstname = mysqli_real_escape_string($con, $_POST['firstname']);&lt;br /&gt;
$lastname = mysqli_real_escape_string($con, $_POST['lastname']);&lt;br /&gt;
$age = mysqli_real_escape_string($con, $_POST['age']);&lt;br /&gt;
&lt;br /&gt;
$sql=&amp;quot;INSERT INTO Persons (FirstName, LastName, Age)&lt;br /&gt;
VALUES ('$firstname', '$lastname', '$age')&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
if (!mysqli_query($con,$sql)) {&lt;br /&gt;
  die('Error: ' . mysqli_error($con));&lt;br /&gt;
}&lt;br /&gt;
echo &amp;quot;1 record added&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
mysqli_close($con);&lt;br /&gt;
?&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>George2</name></author>	</entry>

	</feed>