Form Validation - Specific Number
Posted: Sun Mar 15, 2009 6:18 am
Hi,
I have a simple php update form which allows teams to update their results.
They enter the score and then I have I have 5 fields:
Win
Lose
Draw
Tie
Cancel
I require the teams to only enter the number 1 in one of these fields.
I need to allow only null or 1 for each field and then, I assume the best way is to have a hidden field that sums to total of the 5 fields and ensures that the total of the 5 fields is less than 2
I am new to PHP, so any help with the code would be greatly appreciated.
John
I have a simple php update form which allows teams to update their results.
They enter the score and then I have I have 5 fields:
Win
Lose
Draw
Tie
Cancel
I require the teams to only enter the number 1 in one of these fields.
I need to allow only null or 1 for each field and then, I assume the best way is to have a hidden field that sums to total of the 5 fields and ensures that the total of the 5 fields is less than 2
I am new to PHP, so any help with the code would be greatly appreciated.
John