I would first like to say that I am very new to PHP/MySQL...
I have a database full of infomation already. to view what my database looks like and how it is set up please see the following link ( www.triplesource.net/db/ )
As far as what I have so far this is what I can get my drop down box to do...
( http://www.triplesource.net/php/) Now that is live from the DB it is pulling from the table from ROW "year" how ever... I need it to be showing FIXED options... (I.E.) ( http://www.triplesource.net/php/year%20and%20make.htm ) This is the fixed format I would like... Now the thing I dont know how to do is code it so that php will know the user lets say picked " 2004" and "Honda" now once they choice that they would click a Submit button that will then search my Database and pull all Part numbers that match " 2004 Honda" I know this is very possiable I am just very new to understand such a complex code... There for I am seeking help of others It would really be a grate help if someone can help me out please.
Here is the example of my code
[PHP]<?php
// Make a MySQL Connection
include ('db functions/db_connect.php' );
echo 'Connected to Database!';
echo '<p> </p>';
echo "<select name=D1>";
while($row = mysql_fetch_arr ay($result)){
echo "<option value=$row[YEAR]>$row[year]</a></option>";
}
echo "</select>";
?>
[/PHP]
and here is a second code I started to play with.
[PHP]<?php
// Make a MySQL Connection
include ('db functions/db_connect.php' );
echo 'Connected to Database!';
echo '<p> </p>';
$sql="SELECT id, year FROM Catalog";
$result=mysql_q uery($sql);
$options="";
while ($row=mysql_fet ch_array($resul t)) {
$id=$row["id"];
$thing=$row["year"];
$options.="<OPT ION VALUE=\"$id\">" .$year.'</option>';
}
?> [/PHP]
[HTML]<SELECT NAME=year>
<OPTION VALUE=0>Choose
<?=$options?>
</SELECT>[/HTML]
Thanks in advanced!
Chris