如果没有选择任何内容,请从php中的下拉列表中选择所有值

I have a sql stored procedure similar to below :

create procedure procedurename
declare @startdate datetime, @enddate endtime, @field1 varchar(15) = null

select * from table1
where field1 = @field1 or @field1 is null
and date between @startdate and @enddate

And when I want to display all values from field1, i just ignore supplying parameter @field1 while executing as below

execute procedurename @startdate = '01/07/2012', @enddate = '31/07/2012'

Now I want to access the stored procedure in browser and I tried the code below but if I select "select all" option, it displays blank result.

<?php
$attr = 'selected="selected"';  ?>
<?php
$field1= isset($_REQUEST['field1']) ? $_REQUEST['field1'] : null; ?>
<select name="field1" style="margin-bottom:3px;"> 
<option> select all </option>
<option value="xyz" <?php echo $field1 == 'xyz' ? $attr : ''; ?>>xyz</option>
<option value="abc" <?php echo $field1 == 'abc' ? $attr : ''; ?>>abc</option>
 <option value="def" <?php echo $field1 == 'def' ? $attr : ''; ?>>abc</option>
</select>

So basically I want to it to select all values of field1 if I select "select all" from drop-down box.

Well, I sorted this out myself directly in sql.

I changed my where clause similar to below :

    case when @field1 is '5' then field1 else @field1 end

Then I added value '5' in my list box in php as below

<select name="field1" style="margin-bottom:3px;"> 
<option value="5" <?php echo $field1 == '5' ? $attr : ''; ?>>Select All</option>
<option value="xyz" <?php echo $field1 == 'xyz' ? $attr : ''; ?>>xyz</option>
<option value="abc" <?php echo $field1 == 'abc' ? $attr : ''; ?>>abc</option>
<option value="def" <?php echo $field1 == 'def' ? $attr : ''; ?>>abc</option>
</select>