It looks like you need only one array, $date[begin] = $date[end].
Let's see, I think it'll work. I'll write it in your code then you try:

$i=0;
$result = mysql_query ("SELECT DISTINCT date FROM linktracker WHERE name
LIKE '$PHP_AUTH_USER' ORDER BY date");
if ($row = mysql_fetch_array($result)) {
  do {
    $date[$i] = $row["date"]);
    $i++;
  } while ($row = mysql_fetch_array($result));
} else {print ("Sorry, no record were found.");
} file://end else $result

print("<table><tr><td>Begindate</td<td>Enddate</td></tr>\n".
        "<tr><td><form method=\"post\" action=\"index.php\"
name=\"date_select\">".
        "<input type=\"hidden\" name=\"action\" value=\"date_select\">".
        "<select name=\"date_begin\">");

$i = 0;
while ($date[$i]) {
  echo "<option value=\"".$date_begin  ."\">" . $date_begin .
          "</option>\n";
  $i++;
}

print("</select></td><td><select name=\"date_end\">");

$i--;
while ($date[$i]) {
  echo "<option value=\"".$date_end  ."\">" . $date_end .
          "</option>\n";
  $i--;
}

print("</select></td></tr>\n<tr><td colspan=\"2\">".
        "<input type=\"submit\" name=\"Submit\" value=\"Submit\">".
        "</form></td></tr</table>");

mysql_free_result ($result);
mysql_close();


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to