I've just started playing with sessions and stuff, the choices come from a MySql database, and I'm using a different page for each selection and carrying each variable forward with session_register() ideally once I have the selection I'll be putting into another table in the MySql database. First I have to check things out - eg the value of the selection - thats not a problem I'm simply using
Code: Select all
if ($total > "150"){
die ("woah your selection cost to much");
}$firstcountry
$secondcountry
$thirdcountry
$fourthcountry
$fifthcountry
and so on.
What is the best way to check out the values and number of occurences, like if china appears more than 3 times it would throw up an error message telling you that you have too many from the one country?
I haven't got a clue where to begin