first of all you have a while statement there that does nothing. if the script fails to connect to the db, it exists, else it passes the while because $lk is not false. you should drop that while statement.
second of all you use double quotes (") to create the $qur variable and you never close them. try this:
Code: Select all
<?php
$qur = "INSERT INTO news (id,title, date, time, by, body, email, icq, icon, sing) VALUES (";
$qur .= "'" . $_POST['title'] . "', CURDATE(), CURTIME(), '" . $by . "', '" . $_POST['body'] . "', '" . $email . "', '" . $icq . "', '" . $_POST['how'] . "', '" . $_POST['how'] . "')";
$res = mysql_query($qur);
?>
the thing is mysql needs data that are not functions or numbers entered between quotes. this means that every PHP variable of the query string has to be enclosed between quotes. simple quotes however make the PHP treat variable names as strings and not variables. that's why you need to use concatenation.
and by the way... you missed the $id there... the table requires 10 fields and you provide 9. and the last 2 arguments point to the same variable.
good luck!