How to process input value from HTML form in PHP to insert into MySQL query? -


consider html fragment (which run php script form action):

<label class="form-label" for="dateofbirth">date of birth</label> <input type="date" id="dob" class="field date-field dob-field"   min="1900-01-01" max="2016-12-31" required> 

how can value of date input in php script insert mysql query?

add 'name' attribute use in php $_post.

<input type="date" id="dob" name="exdate" class="field date-field dob-field" min="1900-01-01" max="2016-12-31"  required> 

in php, can

$exdate=$_post['exdate']; 

then use in mysq query

where columnname='$exdate' 

Comments