Not getting option value from my database...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am trying to get an option value from a database. I'm using the following code snippet. This is a postgres 8.3.6 database. I am able to use echo to get a list from the database. The code appears to work, but later when I try to echo the id from the selected record, I get no result. What I'm trying to do, is select the appropriate row from the database using the options menu construct.

                  <form method="POST">
<?
echo "<p> Choose your prospect:<br /><select name='GetName' size='". $rows ."'>";


while (list($peopleId, $fName, $mName, $lName, $contactItem) = pg_fetch_row($SciName))
                 {
echo "<option value='".$peopleId."'> ". $fName . " " . $mName . " " .$lName . "&nbsp;" . " ---". "&nbsp;" . $contactItem . "</option>";
                 }
              echo "</select>";
?>
			<br />
			<br />
 			<input type="submit" name="get_name" value="Submit" />
           <input type="reset" value="Reset" /></p>
           </form>

<?

   }

          }
if ($get_name == "Submit") { echo "People Id = " . $peopleId. "<br / >"; }

Thank you for your time,

Carol Walter

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux