Jump to content


  • Posts

  • Joined

  • Last visited

Krone's Achievements


Newbie (1/7)



  1. Ok, so I've made some pretty good progress, but for some reason, my table headers don't always line up. http://thereal805productions.com/calendar/calendar.php while ( $day_num <= $days_in_month ) { $matched = false; ?> <td> <!-- this should be a table inside each date --> <table> <th> <div id = "<?php echo $myDate ?>" class = "droppable ui-widget-header" > <?php echo $day_num ?> </div> </th> <?php $result = $conn->query($sql); foreach ($result as $row) { // echo "row = " . $row['date'] . " and myDate = " . $myDate; if ($row['botdate'] == $myDate) { ?> <tr><td><div id = '<?php echo $row['id'] ?>' class="draggable ui-widget-content "> <?php echo $row['productId']; ?> </div></td></tr> <?php $matched = true; } else if ($matched == false) { ?> <tr><td> </td></tr> <?php } } ?> <!-- ends the foreach --> </table> </td> <!-- ends the table inside each date --> <?php $day_num++; $day_count++; $myDate = strtotime("+1 day", strtotime($myDate)); $myDate = date("Y-m-d", $myDate); //Make sure we start a new row every week if ($day_count > 7) { echo "</tr><tr>"; $day_count = 1; } } // ends the while loop
  2. Cool, so this seems like it might do what I want http://jqueryui.com/droppable/ Then I would just need to trigger an AJAX event that would go back to the PHP.
  3. Hi, I'm looking to create a webpage that will display a bottling schedule from our database in a calendar format for easy viewing. That part I get and should be easy to do. Use some PHP run a query pull it up. But then what I would like to do is be able to rearrange the bottling schedule by dragging objects from one date to another. So for example, if on May 16th there was a Merlot bottling for 1000 cases, I could drag that to May 20th, and then it would change the database. Again, I understand how to do that once the drag event has been triggered, but I'm not quite sure how to trigger the drag event. I'm thinking it will have to be Javascript for Jquery, but I'm not quite sure how it would work. Any ideas? Thanks,
  • Create New...