Hi Guys,
If i have the following code, how can i get the
if($pref != 'N'){
line to work properly? At the moment i'm getting the ERROR message.
Cheers,
maccam
if($submit){
$sql = "insert into categories(CatID, CatParent, CatName, CatDescription, description, address, suburb, state, post_code, phone, email, Info, url, picture, map_ref, map_pic_detail, pref, active)
values(NULL,'$CatParent','$CatName','$CatDescription','$description','$address','$suburb','$state','$post_code','$phone','$email','$Info','$url','$picture','$map_ref','$map_pic_detail','$pref','$active')";
if($pref != 'N'){
$sql1 = "insert into pref(CatID, pref_email, expiry_date, pref_memo) values(LAST_INSERT_ID(),'$pref_email','$expiry_date','$pref_memo')";
$result = mysql_query($sql);
$result1 = mysql_query($sql1);
if($result1){
echo "<br>Information uploaded successfully.\n";
}
else{
echo "<br><font color=\"red\"><b>ERROR:</b> Your data could not be updated</font>\n";
}
}