Hey there, I’m having some issues with my query and I can’t seem to fin out what’s wrong. First the code:
[code]<?php
session_start();
include("dbConnect.php");
$agent = $_SESSION['agent']; //Set agent name and ID variables
$agentid = $_SESSION['agentId'];
//Check that no section of the form was left blank
if($_POST['fname'] != null && $_POST['sname'] != null && $_POST['jtitle'] != null && $_POST['jdesc'] != null){
mysql_query("INSERT INTO job (jobId, agentId, date, time, jobName, jobDescription, jobstatus, customerFirstname, customerSurname, customerTelephoneNo) VALUES (null, '".$agentid."', CURDATE(), NOW(), '".$_POST['jtitle']."', '".$_POST['jdesc']."', 'Live', '".$_POST['fname']."', '".$_POST['sname']."', '".$_POST['phone']."', )");
header("location:reception.php?content=3");
} else{ //Error message
header("location:reception.php?content=4");
}
?>[/code]
I get no errors when I run this, I have also echo’d back the query and all fields seem to look okay. The thing is even though it runs the code, it does no add the row to my table.