paddy_irl Posted April 20, 2007 Share Posted April 20, 2007 I'm calling text from an mysql database which includes php. I have php echoing values in the database entry for concatenation purposes but when I write it to a page it just writes out the php code in the page source and the browser ignores it. Can I actually put php in a text field in mysql, do I have to format it or change the field type or how should I be approaching this? database entry: some text and <?php echo $value ?> more text php calling the text from the database: $SQL = "SELECT overview_content FROM overview u WHERE u.ov_id = '$ov_type' " ; $u = @mysql_query($SQL) or die("Couldn't execute query @mysql_query($SQL)."); $row =@mysql_fetch_array($u) ; $the_overview = $row['overview_content']; code is working fine and writing out the correct values, the php within the database entry is just being ignored any help is much appreciated! Link to comment https://forums.phpfreaks.com/topic/47891-using-php-in-a-mysql-table-field/ Share on other sites More sharing options...
per1os Posted April 20, 2007 Share Posted April 20, 2007 www.php.net/eval Take a look at that. Link to comment https://forums.phpfreaks.com/topic/47891-using-php-in-a-mysql-table-field/#findComment-234034 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.