I'm trying to create a basic PHP script where I can insert data into a MYSQL database and then, if the option already exists, to increment it by one. Example:
Happy Bored
Name1: 1 0
Name2: 0 1
And if I pick happy again for Name1 and for Name2, the result should change to:
Happy Bored
Name1: 2 0
Name2: 1 1
The HTML code:
<select name="moods">
<option value="happy" selected="selected">Happy</option>
<option value="bored">Bored</option>
</select>