note 16806 rejected from function.eval by zak

From: Date: Wed, 14 Nov 2001 14:33:15 +0000
Subject: note 16806 rejected from function.eval by zak
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-20830@lists.php.net to get a copy of this message
how to get this working... I have insertet this into af mysql-tabel : <?php $string = 'cup'; $name = 'coffee'; $str = 'This is a $string with my $name in it.<br>'; echo $str; eval ("\$str = \"$str\";"); echo $str; ?> now I load this data from a script and want to run it. but it doessn't seem to work with eval($a); where $a is obtained by $a=mysql_result($result,0,"fieldname") however, if the field contain normal html chracters it works by just writin print $a or echo $a but what can i do, if i want to run the above written phpcode (wich is stores in a database field?? i have trided by eval($a); but this gives an error. samir

« previous php.notes (#20830) next »