shane85 Posted April 5, 2010 Share Posted April 5, 2010 I have a drop down so that the options of when to contact next can be chosen. I am using strtotime to do it but its just entering a blank field into my db. The code is as follows for the drop down <select name="contact_next" id="contact_next" class="textfield"> <option value="#" >Please Choose</option> <option value="<?php date('Y-m-d', strtotime('+1 day')); ?>">1 Day</option> <option value="<?php date('Y-m-d', strtotime('+2 day')); ?>">2 Days</option> <option value="<?php date('Y-m-d', strtotime('+3 day')); ?>">3 Days</option> <option value="<?php date('Y-m-d', strtotime('+1 week')); ?>">1 Week</option> <option value="<?php date('Y-m-d', strtotime('+2 week')); ?>">2 Weeks</option> <option value="<?php date('Y-m-d', strtotime('+3 week')); ?>">3 Weeks</option> <option value="<?php date('Y-m-d', strtotime('+1 month')); ?>">1 Month</option> <option value="<?php date('Y-m-d', strtotime('+2 month')); ?>">2 Months</option> <option value="<?php date('Y-m-d', strtotime('+3 month')); ?>">3 Months</option> <option value="<?php date('Y-m-d', strtotime('+6 month')); ?>">6 Months</option> </select> If I just echo <?php echo date('Y-m-d', strtotime('+6 month')); it works perfectly. How come it isnt working and storing into my db??? Link to comment https://forums.phpfreaks.com/topic/197679-date-strtotime-not-working/ Share on other sites More sharing options...
shane85 Posted April 5, 2010 Author Share Posted April 5, 2010 duh...figured it out...cause im not echoing anything in it...lol Link to comment https://forums.phpfreaks.com/topic/197679-date-strtotime-not-working/#findComment-1037419 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.