Where to implement stripslashes?
Posted: Wed Mar 02, 2005 12:56 pm
Below is the code for a little posting program I did. However of course, when the ' get's in there, the slashes come out. Where and how would I implement stripslashes()? Thanks. Im pretty bad at this stuff. 
Code: Select all
<?
///WRITING TO THE FILE LEDGER.TXT
function WriteToFile ($Description, $Image, $EmailAddress, $FullName) {
$TheFile = "ledger.txt";
$CurrentDate = date("l F j, Y");
$Open = fopen ($TheFile, "a");
if ($Open) {
fwrite ($Open,
"<table><tr><td width='400' valign='top'><font size='2' color='#333333'><b>$CurrentDate</b><BR>$Description</font></td></tr><tr><td width='400' valign='top'><font size='2' color='#333333'><u>$FullName</u> | <b><a href='mailto:$EmailAddress'>$EmailAddress</a></b><BR><BR>
</font></td></tr></table><BR>\n");
trim ($Description);
fclose ($Open);
$Worked = TRUE;
} else {
$Worked = FALSE;
}
return $Worked;
}
if(isset($Arrayї'EmailAddress']))
{
$CallFunction = WriteToFile
($Arrayї"Description"], $Arrayї"Image"], $Arrayї"EmailAddress"], $Arrayї"FullName"]);
}
if ($CallFunction) {
print ("\n");
} else {
print ("\n");
}
?>