I have a function that works flawlessly on the main production server. I have a test server and just put up FreeBSD 4.8, Apache 2, and PHP Version 4.3.3. PHP is working fine from what I can see and it is noted that later versions of PHP work fine with Apache 2. However, I keep getting tons of errors on the site that I uploaded on the test box. One of them is:

Fatal error: Cannot redeclare buildoptions() (previously declared in /my/dir/searchDropDown:8)

Is there something wrong with my coding? The function is working fine on the main production server. Would it help if I posted a copy of the function as well on these boards? Thanks in advance for any help.

    It would help if you could post some code....

      <?
      	$dbNamec = "shop_cart";
       	if(!MYSQL_select_db( "$dbNamec")){
      	exit();
      	}
      
      
      function buildOptions($input,$value, $desc) {
      	if ($input == $value) {
      		return "<option value='$value' selected>$desc</option>\n" ;
      	} else {
      		return "<option value='$value'>$desc</option>\n" ;
      	}
      }
      
      // First drop box, APC, Tripplite, whatever
      ?>
      
        Write a Reply...