php - Converting String into Date from HTML Form -


i collect date formats :

day

<select id="dobday" name = "dobday" class="pure-input-1-4"> <option>date of birth day</option> <option value="01">01</option> 

month

<select id="dobmonth" name = "dobmonth" class="pure-input-1-4"> <option>date of birth month</option> <option value="06">06</option> 

year

<select id="dobyear" name = "dobyear" class="pure-input-1-4"> <option>date of birth year</option> <option value="2000">2000</option> 

after form has been posted ,it gets collects :

$dobday = $_post['dobday']; $dobmonth = $_post['dobmonth']; $dobyear = $_post['dobyear']; 

how dateformat stored mysql date feild. have searched web , cannot find example anywhere assistance.

try :

$dobday = '21'; $dobmonth = '09'; $dobyear = '1986';   $full_date = $dobyear.'-'.$dobday.'-'.$dobmonth; echo $full_date;` 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -