use the or die construct in each and every MySQL interaction. one of the problems / features of PHP is that its relatively fault tolerant which can be a problem, especially for people using PHP for the first time.
PHP Code:
$con = mysql_connect("localhost", "tfg_ozcon", "ozcon") or die('Connection failed: ' mysql_errno().': '.mysql_error());
mysql_select_db("tfg_ozcon", $con) or die('Select DB failed: '.mysql_errno().': '.mysql_error());
$sql = "insert your sql here"; //
$sqlr=@mysql_query($sql,$con) or die('SQLfailed: '.mysql_errno().': '.mysql_error());
I'd always recommend that you assign the value of your sql to a variable, especially when debugging as its all to common to thinbk you know what your SQL is doing as opposed to what its actually doing
without any error message its hard to tell what is going wrong. I'm not going to plough through your script (I don't have the time or the energy or the will to do so)
what matters is where its going wrong
either
you have a problem in establishing the contact with the DB server (the connection or the select database)
OR
the query is failing because of syntax errors in the SQL or an untrapped error in selecting the database.
even if I was prepared to plough through your SQL these would be tricky to diagnose looking at your script.
I still think your db design is flaky, I wouldn't expect to see 10 repeating groups of columns. note you shouldn't need to store a start date and time as separate columns, they should be in the same column
assuming you can prove the connection and database are valid then its more likely to be an SQL syntax error
moist likely candidates for that are
date values / literals not presented in the correct style which is the ISO date standard YYYY-MM-DD
string / char / varchar values not encapsulated with " or '
eg
PHP Code:
INSERT INTO mytable (aNumericColumn, aDateColumn, aCharColumn) values (21345, "2011/03/28", "blah di blah");
to prove if its a SQL syntax problem then assuming you have no required (not null columns) insert some values directly into the table
PHP Code:
$sql = "INSERT INTO Casing_Job (Customer) VALUES (99901);
$sqlr=@mysql_query($sql,$con) or die('SQLfailed: ' mysql_errno().': '.mysql_error()
this assumes that the column customer is a numeric column
if its a char / string / text column
PHP Code:
$sql = "INSERT INTO Casing_Job (Customer) VALUES ("An OzCon customer");
$sqlr=@mysql_query($sql,$con) or die('SQLfailed: ' mysql_errno().': '.mysql_error()
another thing to bear in mind is this forum cannot teach you PHP, at best it can help or provide pointers where to look