View Full Version : Import php.....
real_estate
07-26-2006, 07:29 AM
Is there a way to import php in a mysql and export it?
Yes, you can store it as a string then eval() it.
real_estate
07-28-2006, 05:53 AM
Hello Twey,
Hey can u give me an example for the same.
Thanx in advance.
$code = '<?php echo("Hello!"); ?>';
$code = mysql_real_escape_string($code);
mysql_query('insert into table (code) values ("' . $code . '");');
$row = mysql_fetch_array(mysql_query('select code from table where code="' . $code . '" limit 1;'));
eval($row['code']);
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.