run code in 200+ php & hhvm versions
Bugs & Features
<?php session_start(); require("functions.php"); require("htmls.php"); $query = mysql_query("SELECT * FROM products WHERE status = 0") or die (mysql_error()); while($row = mysql_fetch_array($query)) { $datenow = date("Y-m-d"); $duedate = $row['duedate']; $prodid = $row['productid']; if($datenow >= $duedate){ mysql_query("UPDATE products SET status = 1 WHERE productid = '$prodid'") or die (mysql_error()); } } headhtml(); ?> <div id="main_content"> <div id="menu_tab"> <div class="left_menu_corner"></div> <ul class="menu"> <li><a href="home.php" class="nav1">Home</a></li> <li class="divider" ></li> <li><a href="prodcateg.php" class="nav2">Products</a></li> <li class="divider"></li> <li><a href="contact.php" class="nav2">About Us</a></li> <li class="divider"></li> <?php account(); ?> <script type='text/javascript'> jQuery(document).ready( function() { jQuery('.nav3').hide(); jQuery('.nav4').click( function() { jQuery('.nav3').toggle('fade'); }); }); </script> </ul> <div class="right_menu_corner"></div> </div> <!-- end of menu tab --> <div class="crumb_navigation"> Navigation: <span class="current">Home</span> </div> <div class="left_content"> <div class="title_box">Categories</div> <ul class="left_menu"> <?php categories(); logform(); ?> <div class="title_box">Announcements</div> <div class="border_box"> <input type="text" name="newsletter" class="newsletter_input" value="your email"/> <a href="http://all-free-download.com/free-website-templates/" class="join">join</a> </div> <div class="banner_adds"> <a href="#"><img src="images/bann2.jpg" alt="" border="0" /></a> </div> </div> <!-- end of left content --> <div class="center_content"> <div class="center_title_bar">Products On Bid</div> <?php latest(); ?> </div> <!-- end of center content --> <!-- end of right content --> </div> <!-- end of main content --> <?php foothtml(); ?>