I have a form with different fields and all is working fine using PHP and HTML.
And have a database in MySQL.
I have two columns names are from
and to
and form fields like:
INPUT type is TEXT
Database Field datatype is DATE
From: <input class="smltab" type="text" id="from" name="from"/>
To: <input class="smltab" type="text" id="to2" name="to2"/>
The problem is the insert query stuck on from
and to
fields.
And then the entry in Database is 0000-00-00
and 0000-00-00
INSERT QUERY:
$db->Execute("insert into leave_app (leave_type,name,eid,dept,desig,from,to)
values('".$leave."' , '".$name."' , '".$empid."' , '".$dept."' , '".$desg."' , '".$from."' , '".$to."')");