NEWB: Getting a form <select> to activate

From: Cal (cal_at_mssmanufacturing.com)
Date: 10/30/03


Date: 30 Oct 2003 10:44:20 -0800

I'm using the following code:

<?PHP
$query = "SELECT DISTINCTROW Parts.ID, PartNumber, ParentID FROM
Parts, BOM_Entries WHERE Parts.ID = ParentID ORDER BY PartNumber" ;
$results = mysql_query($query, $link) or die("Could not complete
database query");
$num = mysql_num_rows($results);
?>
<form name="form3" method="get" action="bom.php">Display a BOM
<SELECT> name="partnum"

<?PHP
  while ($row = mysql_fetch_array($results)) {
    echo "<OPTION>" . $row[PartNumber];
  }
?>
</SELECT></form>

Which nicely populates my combo, but how do I get it to activate? I
think I need to add onchange=<some php here>, but what? I want to make
it call bom.php with the ?partnum= parameter set to the contents of
the <select>

Thanks



Relevant Pages

  • Re: Confused by mysqli
    ... When I started using MySQL with Perl back in 1998, ... fetch_assocon a query I prepared with bind variables, ... So I had it print out its eval string that it was trying to run. ... PHP will fail to run at all, because bind_result will not have enough ...
    (comp.lang.php)
  • Re: [PHP] PHP & MySQL Problem
    ... [PHP] PHP & MySQL Problem ... > actually there seems to be no problem with your query (besides that you ...
    (php.general)
  • Re: timestamp
    ... PHP newsgroup, and should be discussed in comp.databases.mysql). ... Then click on the Survey link."; ... your SQL syntax; check the manual that corresponds to your MySQL ... Your query fails because a datetime value needs to be in single quotes in the query, ...
    (comp.lang.php)
  • Re: [PHP] Architecture patterns in PHP
    ... 316 Query SHOW TABLES FROM `cake` ... 316 Query DESCRIBE `posts` ... Application and Templating Framework for PHP ... when they cache the results of reverse engineer the object model from ...
    (php.general)
  • Re: Summing exported data from 2 tables into 1 table
    ... > 3 Make a copy of the query. ... > PartNumber and defcode and sorted on PartNumber, ... >>for the same defect code for the same part number. ...
    (microsoft.public.access.externaldata)