hello to *..
I am new in php can you please help me here!
cant insert my data into my database.
<?php
error_reporting (E_ALL ^ E_NOTICE);
$add = $_POST['add']; //Add button
$date = $_POST['date'];
$project = $_POST['project'];
$task = $_POST['task'];
$originated = $_POST['originated'];
$incharge = $_POST['incharge'];
$deadline = $_POST['deadline'];
$status = $_POST['status'];
$comment = $_POST['comment'];
$fin = $_POST['fin'];
if ($add)
{
if(is_array($incharge))
{
foreach($incharge as $val2)
{
$con = mysql_connect ("localhost","root","");
if (!$con)
{
die ('Not connected to DB' . mysql_error());
}
mysql_select_db ("profound_master", $con);
$sql = "INSERT INTO bulletin VALUES ('','$date','$project','$task','$originated','$val2','$deadline','$status','$comment','$fin')";
if (!mysql_query ($sql, $con));
{
die ('Error Sir' . mysql_error()); //I am stock here.
}
echo "1 record added";
mysql_close($con);
}
}
}
?>
Thanks in advance.