Im sure it is, as I think vB does it.
Make a table with...
1 - ID (int)
2 - Name (Varchar 255)
3 - Code (text)
Then make a php page like "inc.phpcodeinsert.php" with a var for the id (inc.phpcodeinsert.php?id=5).
// inc.phpcodeinsert.php
$conHOST = "localhost";
$conUSER = "User";
$conPASS = "Pass";
$conDB = "DBName";
$sql = "select * from CodeTable where CodeTableID = $id";
$db = mysql_connect("$conHOST","$conUSER","$conPASS") or die("Can not Connect");
mysql_select_db("$conDB", $db) or die("Can not establish link");
$result_items = mysql_query($sql, $db) or die("<B>SQL</B><BR>\n$sql<BR><B>MySQL_ERROR</B>\n".MySQL_ERROR()).;
if (! $result_items)
{
echo "Error : <BR> $sql_items";
exit();
}
$num_rows = mysql_num_rows($result_items);
for ($i = 1; $i <= $num_rows; $i++)
{
$row_items = mysql_fetch_array($result_items);
$scriptName = $row_items[scriptName];
$scriptShow = $row_items[scriptShow];
}
Now try
include ('inc.phpcodeinsert.php?id=5 '); // 5 being the corrosponding ID
and see what happens.
I've never done it, so don't flame me - but i'ld be interested to know if it produces usable code. You can also try using a Function to do this, returning "$scriptShow" but it might make the code a little chunkey, I like having lots of inc.XXX.php files.