Sorry I wasn't more explicit about where the doublequote should appear.. I was in a mood. 😉 Kio: the sql statement should probably work anyway with the single quotes around the int. Right?
Your line:
$sql= "INSERT INTO GARAGE_SALES (SALE_ID, SALE_NAME, SALE_ADDRESS, SALE_MONTH
SALE_DATE, SALE_STIME, SALE_FTIME)
VALUES ('$sale_id','$sale_name','$sale_address','$sale_month',
'$sale_date','$sale_stime','$sale_ftime');
Should probably work even if you leave it alone and simply add the double quote where it belongs:
New line:
$sql= "INSERT INTO GARAGE_SALES (SALE_ID, SALE_NAME, SALE_ADDRESS, SALE_MONTH
SALE_DATE, SALE_STIME, SALE_FTIME)
VALUES ('$sale_id','$sale_name','$sale_address','$sale_month',
'$sale_date','$sale_stime','$sale_ftime')";
kio wrote:
Hi there,
Your line:
$sql= "INSERT INTO GARAGE_SALES (SALE_ID, SALE_NAME, SALE_ADDRESS, SALE_MONTH
SALE_DATE, SALE_STIME, SALE_FTIME)
VALUES ('$sale_id','$sale_name','$sale_address','$sale_month',
'$sale_date','$sale_stime','$sale_ftime');
try this:
$sql= "INSERT INTO GARAGE_SALES (SALE_ID, SALE_NAME, SALE_ADDRESS, SALE_MONTH
SALE_DATE, SALE_STIME, SALE_FTIME)
VALUES ($sale_id,'$sale_name','$sale_address','$sale_month',
'$sale_date','$sale_stime','$sale_ftime')";
" at the end of the line and i'll guess your sale_id is an integer, so put away your ' for that field. and forhaps you'll have a field in your table which must be filled...??
make a default value in your form if so.
good luck