[thelist] PHP - Selecting a variable recordset

Paul G Cavo pcavo at juno.com
Wed Oct 16 10:32:01 CDT 2002

I have a listbox which the users selects to determine which recordset
will (should) appear in a subsequent listbox, shown below.
The ChangeRst() function simply reposts the page with the
'SelectCriteria' as a variable. I'm open to suggestions on this as well.

function ChangeRst() {
        document.location =

An additional problem is that my selection is no selected, but refeshes
to the default.

Upon the form re-posting on itself: the 'SelectCriteria' variable is
displaying correctly in the URL querystring, but the recordset selected
is not populating the listbox. I'm assuming that the error in my coding
is in the 'echo $_GET['SelectCriteria']' section of the 'SelectResults'
listbox. Is it returning the variable as a recordset or as a string? I'm
stumped. The output source indicates the following : "Fatal error:Call to
a member function on a non-object", hence my assumption that it is not
recognizing a recordset.

within a form:
<tr><td width="28%"> Search Type:</td>
      <td width="36%"> <select name="SelectCriteria" id="SelectCriteria"
     <option value="">--Select One--</option>
           <option value="rst1">1</option>
           <option value="rst2">2</option>
           <option value="rst3">3</option>
      <td>Search results:</td>
      <td colspan="2"><select name="SelectResults" id="SelectResults"
   while(!$_GET['SelectCriteria'] ->EOF){
          <option value="<?php echo
          <?php echo $_GET['SelectCriteria']->Fields[1]?></option>

Any ideas are greatly appreciated. I'm not commited to this design.

Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:

More information about the thelist mailing list