Forum Moderators: coopster

Message Too Old, No Replies

PHP Code from Database?

- dumb noob question

         

old_expat

8:50 am on Nov 14, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First off, I'm a PHP dummy .. and trying to figure out a solution:

Is it possible to query a database for PHP code? And if so, how is that PHP code added to the page?

Basically, I need pages that have


<?php
$id = "unique 6 digit number";
$name = "unique name";
$link = "unique url";
$location = "unique location";
?>


What follows on the page are additional PHP code blocks that present information which is served from a remote server.

My list is about 1,700 lines.

If so, what query syntax do I need to use? It appears that I cannot 'echo' PHP code in the same manner I can 'echo' other data?

g1smd

11:38 am on Nov 14, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



PHP isn't "added to the page" for sending to the browser.

PHP code has to be executed by the server.

Usually, PHP code is "included", and uses a server-relative internal path to fetch the code.