| rguy84 |
08-13-2009 08:21 AM |
Making an edit script...
Not the best title but here it goes. I am making an application that is a touring schedule that books people for speaking events. The way I am doing the dates looks like this:
PHP Code:
<label for="startMonth" class="hide">Month</label>
<select id="startMonth" name="startMonth">
<option value="01">January</option>
<option value="02">February</option>
<option value="03">March</option>
<option value="04">April</option>
<option value="05">May</option>
<option value="06">June</option>
<option value="07">July</option>
<option value="08">August</option>
<option value="09">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
<label for="startDay" class="hide">Day</label>
<select id="startDay" name="startDay">
<option value="01">1</option>
<option value="02">2</option>
<option value="03">3</option>
<option value="04">4</option>
<option value="05">5</option>
<option value="06">6</option>
<option value="07">7</option>
<option value="08">8</option>
<option value="09">9</option>
<?php
$i = 10;
while($i < 32){
echo "<option value=\"$i\">$i</option>\n\t\t";
$i++;
}
?>
</select>
<label for="startYear" class="hide">Year</label>
<select id="startYear" name="startYear">
<?php
$yy = Date("Y");
$i = 1;
echo "<option value=\"".date("Y")."\">".date("Y")."</option>\n\t";
while($i < 4){
echo "<option value=\"".$yy++."\">".$yy."</option>\n\t";
$i++;
}
?>
</select>
I can use mySQL to parse the date apart, but how do I tell the dropdown to select that value?
I have an admin page that lists the bookings, have an edit link after each booking. So if you click it you go to /editEvent.php&bookingID=(ID from DB). So if you click an event, you go to /editEvent.php&bookingID=6, I get the following error:
Quote:
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
|
What do I need to make this work? And what would I have to do so the right info gets presented?
|