| Posted by Ian Davies on 11/23/05 01:09 
ThanksThat helped
 But now get a syntax error on line 69
 which is
 
 echo "subselect.options[".$ctr."].value =
 \"".$Row2['TopicID']."\";\n";
 
 my debugger is saying
 
 if( mainselect.options[mainselect.selectedIndex].value == "12" ) {
 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result
 resource in e:\domains\i\mysite\user\htdocs\myfolder\Questions.php on line
 67
 } }
 
 It would seem that there is a problem with
 
 mainselect.options[mainselect.selectedIndex].value
 
 Ian
 
 
 
 "Justin Koivisto" <justin@koivi.com> wrote in message
 news:uPidnaxdQ-f-Ch7eRVn-ow@onvoy.com...
 > Ian Davies wrote:
 > >
 > > Parse error: parse error, unexpected T_VAR in
 > > e:\domains\i\iddsoftware.co.uk\user\htdocs\QuestionDB\Questions.php on
 line
 > > 42
 > >
 > <snip>
 >
 > >   function Fill_Sub()
 > >   {
 > >
 > >    <?PHP
 >
 > This is in the wrong spot...
 >
 > >    var mainselect = document.FormName.MainCategory;
 > >    var subselect = document.FormName.SubCategory;
 > >
 > >    if( mainselect.options[mainselect.selectedIndex].value != 0 ) {
 > >
 > >     subselect.length = 0;
 > >    }
 >
 > This is where the "<?php" should be...
 >
 > >     $Query = "SELECT SubjectNo, SubjectDesc, StatusID FROM Subjects
 WHERE
 > > StatusID = 1 ORDER BY SubjectDesc ASC";
 > >     $Result = mysql_query($Query, $conn );
 >
 > <snip>
 >
 > --
 > Justin Koivisto, ZCE - justin@koivi.com
 > http://koivi.com
 [Back to original message] |