Jump to content

[SOLVED] Form <select> (drop down list) help


hurricaneweb

Recommended Posts

I have a <select> list of dates within a form that pulls dates from a SQL table. It works fine except that I would like it to not show the same date multiple times. In other words, I'd like it to display the next date when that field changes.  Here's what it displays right now:

 

select_example.jpg

 

Here is what I have for the code for that select list:

 

<select name="date_gms" id="date_gms">

  <?php do { ?>

      <option value="<?php echo $row_rsSchedule['date_sch']?>"<?php if (!(strcmp($row_rsSchedule['date_sch'], $row_rsGames['date_gms']))) {echo "SELECTED";} ?>><?php echo $row_rsSchedule['date_sch']?></option>

      <?php

        } while ($row_rsSchedule = mysql_fetch_assoc($rsSchedule));

        $rows = mysql_num_rows($rsSchedule);

        if($rows > 0) {

        mysql_data_seek($rsSchedule, 0);

        $row_rsSchedule = mysql_fetch_assoc($rsSchedule);

        }

      ?>

</select>

 

Thanks so much in advance.

Cary

Link to comment
https://forums.phpfreaks.com/topic/65636-solved-form-drop-down-list-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.