troubleshooting Question

Would like to convert information captured from a from to MySQL database.

Avatar of LB1234
LB1234 asked on
PHPMySQL Server
8 Comments1 Solution205 ViewsLast Modified:
I have a table with a field called "birthday" set to the date, data type.  

I have a form which collects the following:

$month = $_POST["month"];
$day = $_POST["day"]; 
$year = $_POST["year"];	

the format for each is as follows:

Month:
    <option value="01">January</option>, etc.

Day (single digit values for $x are 1, 2, 3, (not 01, 02, 03) etc:
<select name="day" id="day"> <?php 
 for ($x=1; $x<=31; $x++) {
 echo "<option value='$x'>$x</option>";
 }
 ?>
</select>


<input name ="year" value = "1980" type="text">
   
How to write an effective query?

i tried strtotime ("$month $day $year")

but that didn't work.

Thanks.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros