(just guessing)
if (!(@ $result = mysql_query($sql))) .....
i think php is "lazy", if you add a @ to a command, it sometimes wont work properly
i have copied that from php.net, maybe you can change it to sth like that
$link = mysql_connect() or die(mysql_error());
$result = mysql_query("SELECT * FROM table ");
$row = mysql_fetch_row($result);
the onChange event:
change:
print '<select name="Available_Images"><br>\n';
into
print '<form name="testForm" action=".......">';
print '<select name="Available_Images" onChange="document.testForm.submit;"><br>\n';
//..... rest of your code here
print '</form>';
there is a named form ( "testForm" ), which is submitted, when the status of the select field changes