Are this code is secure or what?
what mysql_real_esca pe_string do in this code i did't see any change in the code in the database?
If not how can i insert it into the database with out harm my database?
and what are the code if he inserted into the database can harm it to test it?
[PHP]
<?php
mysql_select_db ("Test",mysql_c onnect("localho st","root","")) ;
$data=mysql_rea l_escape_string ("<?php echo Hello ?>");
if(mysql_query( "INSERT INTO test VALUES ('$data','$data ')"))
{
echo "True";
}else{
echo "False";
}
$result=mysql_q uery("SELECT * FROM TEST");
$array=mysql_fe tch_assoc($resu lt);
echo $array['name']."<br />";
?>
[/PHP]
what mysql_real_esca pe_string do in this code i did't see any change in the code in the database?
If not how can i insert it into the database with out harm my database?
and what are the code if he inserted into the database can harm it to test it?
[PHP]
<?php
mysql_select_db ("Test",mysql_c onnect("localho st","root","")) ;
$data=mysql_rea l_escape_string ("<?php echo Hello ?>");
if(mysql_query( "INSERT INTO test VALUES ('$data','$data ')"))
{
echo "True";
}else{
echo "False";
}
$result=mysql_q uery("SELECT * FROM TEST");
$array=mysql_fe tch_assoc($resu lt);
echo $array['name']."<br />";
?>
[/PHP]
Comment