hey- ok. I have the following code. <?php
if($submit) { $arradate = explode("/",$date); $uxdate = mktime(0,0,0,$arradate[0],$arradate[1],$arradate[2]); print $uxdate; } else { ?> <form action="strtotime.php" method="POST"> //name of file is strtotime.php <input type="text" name="date" size="30"> <input type="submit" name="submit" value="submit"> <? } ?> the problem: it's printing out -1 when i submit. I know it means something is wrong, however I can't find an error with this when i have the following code below working perfectly: [sidenote]: i enter the date into the form field like this: 1/11/2002 $date1 = "1/11/2002"; $ardate = explode("/",$date1); $unixdate = mktime(0,0,0,$ardate[0],$ardate[1],$ardate[2]); print $unixdate . "<br>"; can somebody explain to me why this isn't working?? thanks chris p.s. it should return this unix timestamp: 1010725200 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]