Hi,
On my site when a customer registers on the town input they have a dropdown menu with all the towns I cover (hopefully), but this when comlete would approach around 40 - 50 towns and may miss the odd village/town, anyway I then have around 14 IF statements to check which town was choosen on average of 3 towns per IF selection (area) ie IF $timbucktoo or $happytown or $greattown then $area=1..etc.
When their town is found they are given an area number relating to the 3 towns. This number is saved with their customer details...
When another customer logs in using his area number all other customer items with the same area number are shown...
All works well, but all those If statments and town names in the script seem mighty messy and also there is no allowance for missed towns..could change town input title to Choose Nearest Town, but again messy...
Any ideas on impoving would be appreciated, but please make allowances for me being a newbie.
Cheers
John
On my site when a customer registers on the town input they have a dropdown menu with all the towns I cover (hopefully), but this when comlete would approach around 40 - 50 towns and may miss the odd village/town, anyway I then have around 14 IF statements to check which town was choosen on average of 3 towns per IF selection (area) ie IF $timbucktoo or $happytown or $greattown then $area=1..etc.
When their town is found they are given an area number relating to the 3 towns. This number is saved with their customer details...
When another customer logs in using his area number all other customer items with the same area number are shown...
All works well, but all those If statments and town names in the script seem mighty messy and also there is no allowance for missed towns..could change town input title to Choose Nearest Town, but again messy...
Any ideas on impoving would be appreciated, but please make allowances for me being a newbie.
Cheers
John