You are missing semicolons:
if($ad==""){header("location:index.php?kls=1");}else
{if($email==""){header("location:index.php?kls=2");}else
{if($mesaj==""){header("location:index.php?kls=3");}else
{if($kiriklink==""){header("location:index.php?kls=4");}else
{mysql_query("INSERT INTO bildirim (`ad`,`email`,`acklama`,`kiriklink`,`tarih`) VALUES ('$ad','$email','$mesaj','$kiriklink',now())");header("location:index.php?kls=5");}}}}
Btw. if you don’t use, then you should start using some IDE like netbeans or phpdesigner, it will show you where error is
NEW CODE:
if($ad==""){header("location:index.php?kls=1");}else
{if($email==""){header("location:index.php?kls=2");}else
{if($mesaj==""){header("location:index.php?kls=3");}else
{if($kiriklink==""){header("location:index.php?kls=4");}else
{
$query = "INSERT INTO bildirim (`ad`,`email`,`acklama`,`kiriklink`,`tarih`)
VALUES ('$ad','$email','$mesaj','$kiriklink',now())";
$result = mysql_query($query);
if (!$result) {
$message="Invalid query: " . mysql_error() . "\n";
$message .= 'Whole query: ' . $query;
die($message);
}
header("location:index.php?kls=5");
}}}}
Try this new code, there are few changes.
First is that you create query before is is sended to db, so if query don’t work you can try it in phpmyadmin directly and find out if it is correct.
Second is that this code check if query was acomplished, if not it throw you error message and terminate program
and WARNING for you: stop using Mysql_* functions. They are deprecated. Start using Mysqli or PDO, they are much safer
3
solved ( ! ) Parse error: syntax error, unexpected ‘}’ in C:\wamp\www\mybbeklents\rapor\gonder.php on line 11 [duplicate]