Jump to content

Leaderboard

Popular Content

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

  1. P.S. Your main problem is the spaghetti coding style you are using, continually moving in and out of php within the html. Try keeping them as separate as possible with php first then the html section. So something like... <?php function yearEntryOptions($current) { $CurrentMonth = date('n'); $opts = ''; for ($i = -1; $i <= 1; $i++) { $y = date('Y') + $i; $sel = $current == $y ? 'selected' : ''; $dis = ($CurrentMonth != 1 && $i == -1) || ($CurrentMonth <= 10 && $i == 1) ? 'disabled' : ''; $opts .= "<option $sel value='$y' $dis>$y</option>\n"; } return $opts; } ?> <html> <body> <select name="YYYY_Entry" style="width:60px"> <?= yearEntryOptions($SE_YYYY_Entry) ?> </select> </body> </html>
    1 point
This leaderboard is set to New York/GMT-04: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.