Здравейте, имам следният проблем като си преглеждам кода всичко ми е наред но когато потвърдя формата не ми се изпълнявам функцията header
Това е кода
Някой да има някакви предположения
Това е кода
Код:
// check to make sure both fields are entered
if ($omsan_kamion == '' || $omsan_vlekach == '' || $omsan_data == '' || $omsan_firma == '' || $omsan_destination == '')
{
// generate error message
$error = 'Грешка: Моля попълнете задължителните полета!';
// if either field is blank, display the form again
renderForm($omsan_kamion, $omsan_vlekach, $omsan_evropa, $omsan_evropa2, $omsan_turcia, $omsan_turcia2, $omsan_data, $omsan_data2, $omsan_destination, $omsan_firma, $omsan_cemt, $omsan_zabelejka, $error);
}
else
{
// save the data to the database
mysql_query("SET CHARACTER SET utf8");
mysql_query("INSERT spisak_omsan SET kamion='$omsan_kamion', vlekach='$omsan_vlekach', shofior_evropa='$omsan_evropa', shofior_evropa2='$omsan_evropa2', shofior_turcia='$omsan_turcia', shofior_turcia2='$omsan_turcia2', data_trugvane='$omsan_data', data_pribirane='$omsan_data2', destination='$omsan_destination', firma='$omsan_firma', cemt='$omsan_cemt', zabelejka='$omsan_zabelejka' ")
or die(mysql_error());
// once saved, redirect back to the view page
header("Location: ?page=success");
}
}
else
// if the form hasn't been submitted, display the form
{
renderForm('','','','','','','','','','','','','');
}
?>
Някой да има някакви предположения