PHP 4.4/MySQL 4.0

I am tying to convert a date to put into a database from a string (ie: January, February) to a numeric value (ie: 01,02). I am taking the value from a form, which is a drop down menu listing the months.

$sMonth1 = $_POST['Smonth']; returns the money selected from the form.
When I go to format the month from a string to numeric with date('m',strtotime($sMonth1));
it returns 12, no matter which month I select.

In reading the docs at, date('m',strtotime($sMonth1)); is correct to reformat from a string to a time format.

What am I missing.

mark bomgardner

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to