0

Hi all, i would like to ask about, i have (date_from) and (date_to), and i want the range of the date show in the checkbox.
Example: date from: 6/8/2014 and date to: 8/8/2014.
it will show 6/8/2014, 7/8/2014 and 8/8/2014 along with check box.

so, i have success make the date and checkbox show with the code below;

However, i wish to know how to get the value from the check box which is being checked to be shown due to the checkbox i created without any value assigned to it?

Anyone can assist me on this? Thank you very much.

<?php
    $startDate = strtotime($datefrom);  
    $endDate = strtotime($dateto);  
    $date = $startDate;  

        while( $date <= $endDate) {  
        echo  "<input type='checkbox' name='date'>";
        echo date('d-m-Y', $date) .' ';  
        $date = strtotime('+1 day', $date); 
    }

?>
2
Contributors
2
Replies
13
Views
3 Years
Discussion Span
Last Post by ilovephp798
0

Thanks for your solution. I have tried this before also, but maybe due to tiny mistake and caused it doesn't work. Thanks alot! :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.