Forum Moderators: coopster
in the DB it is entered as:
INSERT INTO my_table VALUES (1, '<? echo"<li><a href=\"aaaaa.php?state=".alaska." \"> Alaska</a></li>";?>');
if I insert it in a PHP file it works fine.
<? echo"<li><a href=\"aaaaa.php?state=".alaska." \"> Alaska</a></li>";?>
if I call it from a query it results in "blank" and view source shows:
<? echo"<li><a href="aaaaa.php?state=".alaska." "> Alaska</a></li>";?>
then I know that escaping \" are gone
if I manually edit the DB and add the slahes back then it partially works
and show an activated link like that one but also echos the end of the line.
Alaska";?>
what should I do?
Why are you inserting <? and?> into database? will you parse (i.e. eval) php code at a later stage? If not then in phpmyadmin you should insert it like
INSERT INTO my_table VALUES (1, '<li><a href="aaaaa.php?state=alaska"> Alaska</a></li>');