Forum Moderators: coopster
$dateReg = $_POST['dateReg'];
$name = $_POST['name'];
$fatherN = $_POST['fatherN'];
$sex = $_POST['sex'];
$age = $_POST['age'];
$address = $_POST['address'];
$phone = $_POST['phone'];
$dateAttStar = $_POST['dateAttStar'];
$attCat = $_POST['attCat'];
$diseaseClass = $_POST['diseaseClass'];
$site = $_POST['site'];
$type = $_POST['type'];
$weight0 = $_POST['weight0'];
$sp0 = $_POST['sp0'];
$sp0Date = $_POST['sp0Date'];
$sp0Lab = $_POST['sp0Lab'];
$cs1 = $_POST['cs1'];
$dateStop = $_POST['dateStop'];
$patientIs = $_POST['patientIs'];
$remarks = $_POST['remarks'];
mysql_connect("localhost", "root") or die(mysql_error());
mysql_select_db("mydb") or die(mysql_error());
$query = "INSERT INTO register (dateReg,name,fatherN,sex,age,address,phone,dateAttStar,attCat,diseaseClass,site,type,weight0,sp0,sp0Date,sp0Lab,cs1,dateStop,patientIs,remarks) values ('$dateReg', '$name', '$fatherN', '$sex', '$age', '$address', '$phone', '$dateAttStar', '$attCat', '$diseaseClass', '$site', '$type', '$weight0', '$sp0', '$sp0Date', '$sp0Lab', '$cs1', '$dateStop', '$patientIs', '$remarks')";
but the error is:
Incorrect date value: '' for column 'dateStop' at row 1
i tried the empty value then 0000-00-00 and finally 2006-07-02 for the dateStop but with all i get the above error, when i insert the values into table directly from the mysql window the above isnert syntax is working without any error, any one can help please?
[edited by: jatar_k at 12:43 am (utc) on July 17, 2006]
[edit reason]
[1][edit reason] fixed sidescroll [/edit] [/edit][/1]
Good luck!