hiii ppl of the forum..

I have this date field in the form, i managed to get the calender script work, when i select the date, it appears properly in the text field, but on cliking submit, it gets stored as 0000-00-00 in the database.

any idea frens what is happening here..please help me out

thanks

<td align="left">Purchase Order Date:</td>
            <td><input type="text" name="podate" id="podate" tabindex="2" />
            <a onclick="setYears(1234, 2050); showCalender(this, 'podate');"><img src="../web/images/calender5.jpeg" /></a>
              <?php require_once('../web/calhtml.html');?></td>

frens, more info on this issue, i tried to print the date using alert n it is happening properly, so is the issue with $_POST again?

hii ppl, phew finally got this thing to work..

issue was, date picked from calender was in dd-mm-yyyy format and mysql doesnt support this format. for the date to be saved in mysql, it should be in yyyy-dd-mm format. more info on this is here.. http://cookbooks.adobe.com/post_Format_dates_for_entry_into_MySQL_using_PHP-16644.html

to overcome this issue, refer to followinghttp://www.phpbuilder.com/board/showthread.php?t=10316456

hope it helps you ppl..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.