Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Steve Coates

Members
  • Joined

  • Last visited

  1. Hi, I have created an application through which a golf club can use online simple forms to add, edit and delete tee times as required. The problem I'm having is that I need to have a different background colour for entries that are weekends. Is this possible using PHP? I tried using this method but it doesn't seem to work.. <? if(date('D') == 'Sat' || date('D') == 'Sun'){ $class= 'weekend'; } else{ $class='weekday'; } ?> <? if($date != $row['date_added']) { $date = $row['date_added']; ?> <? echo date ("l jS, F", strtotime( $row['date_added'] )); ?> <? } ?> Many Thanks! -Steve
  2. Hmm.. Still getting the same thing How annoying! (not you my script! ) I was considering using the 'array_diff' but have yet to get that working.. Cheers for your help dude!
  3. Thanks so much for replying vertmonkee! I just tried to run this script and added some basic echos to see if it's displaying the right output. My problems are: • Checking boxes on the first page doesn't seem to effect the code below. It always states 'There are boxes unchecked' even if all the checkboxes are ticked on the previous page? • I don't know how to show which check boxes haven't been checked? Please help if you can! Thankyou!! <?php // Set a blank array to hold all of the unticked items $unticked = array(); // Assign the post values to a variable $ticked = $_POST; // Loop through the database results while($row = mysql_fetch_array($result)) { // Check if the current item is not in the ticked array if(!in_array($row['checklistitem'], $ticked)) { // The item does not appear in the ticked array so the user must have left it unticked // Add it to the unticked array $unticked[] = $row['checklistitem']; } } // Check if there are any unticked items and display them if so if(count($unticked) > 0) { echo "There are boxes unchecked!"; } else { echo "You've checked all the boxes!"; } ?>
  4. Hi, I have a set of checkboxes a bit like a checklist and I then want the items that aren't checked to displayed. On the first page, I have this code: <? while($row = mysql_fetch_array($result)) { ?> <form action="packed.php" method="post"> <div> <label><input type="checkbox" name="<? echo stripslashes($row['checklistitem']); ?>" value="yes"> <? echo stripslashes($row['checklistitem']); ?> </label> </div> This basically takes an array from a database. The info is then posted to the next page which hopefully will display the boxes which are 'unticked' or unchecked if you will. The code I have on the second page is: <?php $query_string = ""; if ($_POST) { $kv = array(); foreach ($_POST as $key => $value) { $kv[] = "$key"; } $query_string = join("<br />", $kv); } else { $query_string = $_SERVER['QUERY_STRING']; } echo $query_string; ?> At the moment, it returns the array items that were checked but I want the unchecked ones to be shown. Is that possible? Thanks very much! -Steve
  5. Hey! I'm Steve, I am studying web design/development at uni at the moment. I'm looking to help and get some help from these forums as well as getting generally involved with other web designers and keeping myself 'in-the-loop' as it were. Thank! -Steve

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.