I have mysql database with code in 1 of the fields
test test test <?php $_GET['location']; ?> test test
I am accessing display file test.php?location=abc and displaying that record from database in the following way
This is my <?php echo $row_display_content['location']; ?>
And the only result I have got is
This is my
have no idea how to make it works, so dynamic values may be displayed inside the text from database
Use the eval function. Btw, this is a terrible approach to whatever problem you're trying to solve.
http://php.net/manual/en/function.eval.php
Edit:
$code = 'test test test <?php $_GET[\'location\']; ?> test test';
eval('?>'. $code);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With