Page 1 of 1

Insert PHP into page ?

Posted: Tue Feb 03, 2009 11:47 am
by chadlong41
I have got my database driven web site I m using

Code: Select all

$query = "SELECT * FROM $sTableName WHERE ID=$inPageID LIMIT 1";
    $_CONTENT = mysql_fetch_array(mysql_query($query));
 
<?= $_CONTENT['PAGE_CONTENT'] ?>
 
to insert the content, into the page.
Now if I wanted to add a php command into the page (the part thats stored on the database) im not sure what to do.

can someone help me out here?
Thanks !

Re: Insert PHP into page ?

Posted: Tue Feb 03, 2009 1:16 pm
by JAB Creations
I'm not sure what you're trying to do exactly but it sounds like you've got PHP code executing in one file but want to include it in another...

Code: Select all

<?php
/*
This is the page the client sees.
*/
include("path_to_php_in_other_file");
?>