After implementing some of the suggestions and a couple of easy things I found this is what is happening.
php file
Code:
<?php
$year = $_POST['year2'];
///////////////////////////////////////////////// make query for dropdown
$query = sprintf("SELECT DISTINCT makeid, makename FROM iemmy WHERE yearid='$year'");
$result = @mysql_query($query);
$rowMake = mysql_fetch_array($result);
/////////////////////////////////////////////////
if (mysql_num_rows ($result) >= 1)
{
$makeid = array();
while ($rows = mysql_fetch_array ($result, MYSQL_ASSOC)) array_push ($makeid, $rows);
$smarty->assign ("makeid", $makeid);
}
?>
Is giving me:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
D:\wamp\www\xcart\mmy.php on line
6
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in
D:\wamp\www\xcart\mmy.php on line
8
Now I'm guessing query is not returning any results. Does the query automatically use the last connection to the database? Or is there something I need to change in the connection to get this to work? Thanks again.
Adam