Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/13/2023 in all areas

  1. If you know that the form was submitted then you could take the absence of a value as proof that it was unchecked. But yes, there is a simple solution that lets you keep checkboxes: use hidden inputs. <input type="hidden" name="checkbox" value="off"> <input type="checkbox" name="checkbox" value="on"> When checked, the checkbox's "on" overwrites the hidden input's "off".
    1 point
  2. Checkboxes are only submitted in form data when they are checked.
    1 point
  3. "Simple" string interpolation only allows you to access a single level of an array. If you want multiple levels then use the "complex" syntax with braces: "value='{$rows[0]['itemName']}'>"
    1 point
  4. Do I take it that a new image is one that is less than 2 weeks old? $day = date('Y-m-d', strtotime("2023-08-30 16:03:32")); if($day > date('Y-m-d', strtotime('-2 weeks'))){ echo "img src='https://i.imgur.com/0rlIlUD.gif'"; } @requinix - I see what you mean
    1 point
This leaderboard is set to New York/GMT-05:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.