php help, real easy, for free porn! :D lol
Help me and i'll toss ya a membership haha ;)
I am trying to setup a table where i have it as a template and one with all my data. id like to load some fields from table one, and have them displayed from templates made in table 2. below is an example, however it doesnt seem to parse the variables pulled from the database when its encoded into another template.. below is my example - the field is set to text, also tried longtext
$DBLINK = mysql_connect($DBHOST, $DBLOGIN, $DBPASSWORD);
mysql_select_db($DBNAME, $DBLINK);
$result = mysql_query("SELECT * FROM galleries WHERE ID = $gid",$DBLINK);
if ($myrow = mysql_fetch_array($result)) {
do {
$result2 = mysql_query("SELECT * FROM templates WHERE ID = 1",$DBLINK);
if ($mytemplate = mysql_fetch_array($result2)) {
do {
echo $myrow["modelname"], $myrow["modeldir"], $mytemplate["format"];
} while ($mytemplate = mysql_fetch_array($result2));
} else {
echo "Sorry, no templates were found!";
}
} while ($myrow = mysql_fetch_array($result));
} else {
echo "Sorry, no records were found!";
}
?>
|