[thelist] newbie php question
Heather Ruggio
hjrbaby at yahoo.com
Tue Jun 26 14:26:13 CDT 2001
I have a script from an instruction book that is a
news source. When there is a long "article," lots of
slashes appear in it. I have another book that has
information on the stripslash function, but I can't
figure out how to get it to work with the other
functions already in the script. This is what it
originally looked like:
***
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
print("<tr><td bgcolor=\"#003399\"><b>");
printf("<font
color=\"white\">%s</font></b></td></tr>\n",
$row["heading"]);
printf("<td>By: <a href=\"mailto:%s\">%s</a>\n",
$row["author_email"], $row["author_name"]);
printf("<br>Posted: %s<hr>\n",
$row["date"]);
printf("%s</td></tr>\n",
$row["body"]);
}
***
How do I use the stripslash function with that? And
do I need to do something special when the article is
going in to the database to protect the hard returns
and quotes?
Thanks,
Heather Ruggio
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/
More information about the thelist
mailing list