Insert PHP into page ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
chadlong41
Forum Newbie
Posts: 3
Joined: Tue Feb 03, 2009 11:33 am

Insert PHP into page ?

Post 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 !
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Insert PHP into page ?

Post 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");
?>
Post Reply