Im having an issue with displaying html that is pulled from my mysql database. I have tried using the stripslashes() function but nothing appears to help. The html is inserted into the database fine. But when its pulled out it leaves out the first tag and then adds a quotation mark and a > sign.
Here's the html thats inserted:
<div align="center"><img width="312" height="150" border="1" src="http://usabassin.com/images/sponsors/bigriver.jpg" /> </div><div align="center"> </div><div align="center"> Located near scenic Monroe Reservoir in Southern Indiana,<br /> we at Big River Tackle and Timber sell first-rate log furniture<br /> and cabin-style furnishings.With tools for the serious fisherman,<br /> we sell live bait and quality tackle. Heading south to Monroe<br /> Reservoir? Then stop at Big River Tackle and Timber for all your<br /> fishing needs.</div> <div align="center"> </div> <div align="center"><strong>Telephone:</strong> </div> <div align="center">(812)988-0500 <br /> </div> <div align="center"> <strong>Postal Address:</strong><br /> </div> <div align="center"> Big River Tackle & Timber <br /> </div> <div align="center"> 4413 East State Road 46 <br /> Nashville, IN 47448</div>
Heres what I get back from the query:
<img width="312" height="150" border="1" src="http://usabassin.com/images/sponsors/bigriver.jpg" /> <div align="center"> </div><div align="center"> Located near scenic Monroe Reservoir in Southern Indiana,<br />
we at Big River Tackle and Timber sell first-rate log furniture<br />
and cabin-style furnishings.With tools for the serious fisherman,<br />
we sell live bait and quality tackle. Heading south to Monroe<br />
Reservoir? Then stop at Big River Tackle and Timber for all your<br />
fishing needs.</div> <div align="center"> </div> <div align="center"><strong>Telephone:</strong> </div> <div align="center">(812)988-0500 <br />
</div> <div align="center"> <strong>Postal Address:</strong><br />
</div> <div align="center"> Big River Tackle & Timber <br />
</div> <div align="center"> 4413 East State Road 46 <br />
Nashville, IN 47448</div>">
Now heres my php code:
OpenTable();
echo "<center><font class=\"content\"><b>Edit Division</b><br><br></font></center>";
$result = $db->sql_query("select div_id, div_name, div_logo, div_info, div_director, div_address, div_citystzip, div_phone, div_email, div_director2, div_address2, div_citystzip2, div_phone2, div_email2 from ".$prefix."_tourn_divisions where div_id='$div_id'");
$div_id = intval($div_id);
list($div_id, $div_name, $div_logo, $div_info, $div_director, $div_address, $div_citystzip, $div_phone, $div_email, $div_director2, $div_address2, $div_citystzip2, $div_phone2, $div_email2) = $db->sql_fetchrow($result);
$div_info = stripslashes($div_info);
echo "<table width=\"90%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\">"
."<tr><td bgcolor=\"#CCCCCC\">"
."<table width=\"100%\" cellspacing=\"1\" cellpadding=\"2\" border=\"0\" align=\"center\">"
."<tr><td colspan=\"2\" bgcolor=\"#e6e6e6\">"
."<center><b>Edit Division</b></center>"
."</td></tr>"
."<form action=\"admin.php\" method=\"post\">"
."<tr bgcolor=\"#e6e6e6\"><td colspan=\"2\">"
."<center><br><b>Edit Division Name:</b><br><input type=\"text\" name=\"div_name\" size=\"50\" maxlength=\"50\" value=\"$div_name\"></center><br>"
."</td></tr>"
."<tr bgcolor=\"#e6e6e6\"><td colspan=\"2\">"
."<center><br><b>Edit Division Logo:</b><br>(Ex. [url]http://www.usabassin.com/images/logo.jpg[/url])<br><input type=\"text\" name=\"div_logo\" size=\"50\" maxlength=\"50\" value=\"$div_logo\"></center><br>"
."</td></tr>"
."<tr bgcolor=\"#e6e6e6\" align=\"center\"><td width=\"50%\"><b>Edit Director Info</b></td><td width=\"50%\"><b>Edit Asst. Director Info</b></td></tr>"
."<tr bgcolor=\"#e6e6e6\" align=\"center\"><td width=\"50%\"><b>Name<br></b><input type=\"text\" name=\"div_director\" size=\"30\" maxlength=\"50\" value=\"$div_director\"></td><td width=\"50%\"><b>Name</b><br><input type=\"text\" name=\"div_director2\" size=\"30\" maxlength=\"50\" value=\"$div_director2\"></td></tr>"
."<tr bgcolor=\"#e6e6e6\" align=\"center\"><td width=\"50%\"><b>Address</b><br><input type=\"text\" name=\"div_address\" size=\"30\" maxlength=\"50\" value=\"$div_address\"></td><td width=\"50%\"><b>Address</b><br><input type=\"text\" name=\"div_address2\" size=\"30\" maxlength=\"50\" value=\"$div_address2\"></td></tr>"
."<tr bgcolor=\"#e6e6e6\" align=\"center\"><td width=\"50%\"><b>City,State,Zip</b><br><input type=\"text\" name=\"div_citystzip\" size=\"30\" maxlength=\"50\" value=\"$div_citystzip\"></td><td width=\"50%\"><b>City,State,Zip</b><br><input type=\"text\" name=\"div_citystzip2\" size=\"30\" maxlength=\"50\" value=\"$div_citystzip2\"></td></tr>"
."<tr bgcolor=\"#e6e6e6\" align=\"center\"><td width=\"50%\"><b>Phone</b><br><input type=\"text\" name=\"div_phone\" size=\"30\" maxlength=\"50\" value=\"$div_phone\"></td><td width=\"50%\"><b>Phone</b><br><input type=\"text\" name=\"div_phone2\" size=\"30\" maxlength=\"50\" value=\"$div_phone2\"></td></tr>"
."<tr bgcolor=\"#e6e6e6\" align=\"center\"><td width=\"50%\"><b>Email</b><br><input type=\"text\" name=\"div_email\" size=\"30\" maxlength=\"50\" value=\"$div_email\"></td><td width=\"50%\"><b>Email</b><br><input type=\"text\" name=\"div_email2\" size=\"30\" maxlength=\"50\" value=\"$div_email2\"></td></tr>"
."<tr bgcolor=\"#e6e6e6\"><td colspan=\"2\">"
."<center><br><b>Edit Division Info:</b><br><textarea name=\"div_info\" cols=\"80\" rows=\"15\" value=\"$div_info\"></textarea></center><br>"
."<input type=\"hidden\" name=\"div_id\" value=\"$div_id\">"
."<input type=\"hidden\" name=\"op\" value=\"divisions_modify\">"
."</td></tr></table>"
."</td></tr></table>"
."<center><br><input type=\"submit\" value=\"Submit\"></center>"
."</form>"
."<br><br></center>";
CloseTable();