Hi, If someone could help me it would be appreciated,
I have a form that has 4 textboxes anda function that takes the input from these and adds it to a mysql db. My problem is my INSERT statement dosen't seem to work:
The code is as follows
function Add_new_details($task_name,$task_description,$task_date,$task_time){
$query = "INSERT INTO calander (task_name, task_description, task_date, task_time) ";
$query .= "VALUES ('$task_name', '$task_description','$task_date','$task_time') ";
echo $query;//this prints out a empty set for the VALUES
$result = mysql_query($query);
echo $result; //this prints out "1"
if(!$result){
echo "Error in search for results:".mysql_error();
//exit();
}
}
The function call is as follows:
Add_new_details($task_name,$task_description,$task_date,$task_time);
I can manually insert into the db, so I know it can be done
Thank you for your time
twb