moshina786 Posted May 1, 2011 Share Posted May 1, 2011 Hi Guys, I have a webpage which has subsequent pages stored in a database e.g. index.php?id=1 The problem being, is that id=1 has it's data pulled from a database. This was fine & dandy until I started to insert PHP...I am trying to get the below to executre <?php $rater_id=1; $rater_item_name='Rate This'; include("rater.php");?> However nothing shows & nothing happens, I know eval can be used but have not been succesfull in implementing this, can someone please help! Link to comment https://forums.phpfreaks.com/topic/235267-execute-php-stored-in-mysql-database/ Share on other sites More sharing options...
Fadion Posted May 1, 2011 Share Posted May 1, 2011 Pages stored in a database? Usually specific data are stored in a database, each one with it's own, unique ID. That "id" url variable can be retrieved with $_GET and be used to fetch the correct row from the database. Simple enough, at least from what your request looks like. PS: eval() should be renamed to evil(). As Rasmus Lerdorf [is thought] to say, "If eval() is the answer, you're almost certainly asking the wrong question.". Link to comment https://forums.phpfreaks.com/topic/235267-execute-php-stored-in-mysql-database/#findComment-1208996 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.