Well, I think I've figured out how to do everything I want to do but I'm still having a problem with the variable that holds the details of the drop-down box.
I have the following snippet of code:
<select name="property_type" onChange="document.location=this.value + 'addproperty.php'
+ '?firstrun=<? echo $firstrun ?>'
+ '&property_type=<? echo $property_type ?>'">
<option <? if ($property_type == "Hotel")
echo "selected" ?>>Hotel</option>
<option <? if ($property_type == "Bed and Breakfast")
echo "selected" ?>>Bed and Breakfast</option>
<option <? if ($property_type == "Caravan/Camping Site")
echo "selected" ?>>Caravan/Camping Site</option>
<option <? if ($property_type == "Holiday Cottage")
echo "selected" ?>>Holiday Cottage</option>
<option <? if ($property_type == "Hostel/Bunkhouse")
echo "selected" ?>>Hostel/Bunkhouse</option>
</select>
The variable that's causing the problem is $property_type. Am I misunderstanding the value that will be stored here when a selection is made in the drop-down box? Or is there an issue with passing the variable back to the script when a selection is made?
BTW: The remainder of the code works fine as it's been manually tested by hard coding a string to $property_type. Unfortunately, when the hard coding is removed, $property_type remains null.
$firstrun is passed ok and so I can only think it's something to do with the way the dropdown box passes values to a variable.