OK, bare with me here... this is the code thats on the first page:
<form method = post action = "http://localhost/chooseMovie.php">
<?php
$db = mysql_connect("localhost", "root", "password");
mysql_select_db("archives",$db);
?>
Choose a category:<br>
<select name=category>
<?
$result = mysql_query("SELECT catId, category FROM category",$db);
while ($row = mysql_fetch_object($result))
{
echo "<option value=" . $row->catId . ">" . $row->category . "</option><br>";
}
mysql_free_result($result);
?>
</select>
This populates the first drop box with the results of a MySQL database.
Then in "chooseMovie.php" I have this code:
<form method = get action = "http://localhost/playMovie.html">
Movies in this category:<br>
<?php
$db = mysql_connect("localhost", "root", "password");
mysql_select_db("archives",$db);
?>
Choose a movie:<br>
<select name=movie>
<?
$result = mysql_query("SELECT movieName FROM category WHERE catId = "$category"",$db);
while ($row = mysql_fetch_object($result))
{
echo "<option>" . $row->movieName . "</option><br>";
}
mysql_free_result($result);
?>
</select>
the error Im having is with the MySQL query where Im trying to reference what was chosen in the first place....
Hope this is understandable!!
🙁