if ($man_car=="" or $type_car=="" or $license_car=="" or $drive_car=="" or $branch=="" or $date_go=="" or $date_to=="" or $head=="" or $detail=="") {
echo "<script>
alert('กรุณากรอกข้อมูลให้ครบ');
window.location='car_form.php'
</script>";
exit();
}
include "connect.php";
$sql="insert into car VALUES('','$man_car','$type_car','$license_car','$drive_car','$branch','$date_go'$date_to','$head','$detail')";
$result=mysql_db_query($dbname,$sql);
if ($result) {
echo "<script>
alert('เพิ่มเที่ยวรถเรียบร้อยแล้ว');
window.location='view_car.php'
</script>";