Jump to content

removing apostrophes


Recommended Posts

   $horsename = $_POST['horsename'];
$horsename = strip_tags($horsename); 
$horsename = trim ($horsename); 
$horsename = trim ($horsename, "\" \'"); 
$horsename = htmlspecialchars($horsename, ENT_QUOTES);
$horsename = mysql_real_escape_string($horsename);
   $sire = $_POST['sire'];
$sire = strip_tags($sire); 
$sire = trim ($sire); 
$sire = trim ($sire, "\" \'"); 
$sire = htmlspecialchars($sire, ENT_QUOTES);
$sire = mysql_real_escape_string($sire);
   $dam = $_POST['dam'];
$dam = strip_tags($dam); 
$dam = trim ($dam); 
$dam = trim ($dam, "\" \'"); 
$dam = htmlspecialchars($dam, ENT_QUOTES);
$dam = mysql_real_escape_string($dam);
   $damsire = $_POST['damsire'];
$damsire = strip_tags($damsire); 
$damsire = trim ($damsire); 
$damsire = trim ($damsire, "\" \'"); 
$damsire = htmlspecialchars($damsire, ENT_QUOTES);   
$damsire = mysql_real_escape_string($damsire);

 

This is the bit that I have coded.

I still haven't figured out how to strip apostrophes so it actually works.

Could anyone offer help?

Thanks

Link to comment
https://forums.phpfreaks.com/topic/200622-removing-apostrophes/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.