Hi,
i think that register_globals is set to off in php.ini. In that case you need to use $GET['varname'] to fetch get variables and $POST['varname'] to fetch post variables (like the ones submitted by your form).
The javascript part can be reduced using arrays, somethink like (in short)
var optionArray = new Array();
optionArray["Commercial Property"] = new Array('Business Properties-Lease','Business Property-Sale');
optionArray["Employment"] = new Array('Part Time','Full Time');
function ChangeOne(category) {
if (optionArray[category]) {
document.submit_ad.Subcategory.options.length=0;
for (i=0;i<optionArray[category].length;i++) {
myOpt = new Option();
myOpt.text = optionArray[category][i];
myOpt.value = optionArray[category][i];
document.submit_ad.Subcategory.options[document.submit_ad.Subcategory.options.length]=myOpt;
}
}
}
You need to change the category select code a little bit:
<select size='1' name='Category' onChange='ChangeOne(this.value)'>
A way without the ChangeOne function is to submit the form each time the Category changes and to print the options using PHP.
Regards,
Thomas