Oh oops sorry just for this pose i replaced the actuall variables with $variable.
Without the portion that i am trying to add it works fine. But as soon as i add it in (Perhaps i am messing up when i put the code in? ) It stops working all toghter.
Here is what i am using
$variable is just a place holder for this post.
$templateName = 'test';
$templateOwner = '';
$OldID = '2';
$groupName ='Test';
if(!isset($OldID))
{
mysql_query("
SELECT field FROM table
WHERE field='".$variable."',
AND eff_end ='".0000-00-00 00:00:00."'",$dbConnection);
}
elseif(empty($OldID))
{
mysql_query("
INSERT INTO table SET
field = '". $variable."'
",$dbConnection);
}
}
else
{
mysql_query("
INSERT INTO table SET
feild = '" . $variable . "',
feild = '" . $variable . "'
", $dbConnection);
$Template_id = mysql_insert_id($dbConnection);
foreach ( $UI_CoolData as $i_header => $header ){
mysql_query("
INSERT INTO table SET
field = '" . $variable['TEXT'] . "',
field = ' " . $variable. "'
", $dbConnection);
$cat_id = mysql_insert_id($dbConnection);
mysql_query("
INSERT INTO table SET
field = '" . $variable. "',
field = '" . $variable. "'
");
foreach ( $header['QUESTIONS'] as $i_question => $question ){
mysql_query("
INSERT INTO table SET
field= '" . $variable['TEXT'] . "',
field = '" . $variable['TYPE'] . "',
field = ' " . $variable['VALUE'] . "',
field = '" . $variable. "'
", $dbConnection);
$ques_id = mysql_insert_id($dbConnection);
mysql_query("
INSERT INTO tableSET
field = '" . $variable. "',
field = '" . $variable. "'
");
}
}
mysql_close($dbConnection);
<html>
<body>
The data was saved on database.
</body>
</html>