I have got my database driven web site I m using

Code :

$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) i m not sure what to do.

can someone help me out here?

Thanks !

Recommended Answers

All 2 Replies

Member Avatar for diafol

Now if I wanted to add a php command into the page (the part thats stored on the database) i m not sure what to do.

Sorry, don't follow you.
Any php should be tagged:

<?php
echo "Hello World!";
?>

There are some decent tutorials online, have a go yourself first.

Using <?= is shorthand for printing whatever is between the tags. I don't understand your problem, however. Do you have PHP code stored in a database that you would want to execute?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.