PHP - Getting a form to recognize a letter as a number?

Jordan K

New member
Hi, i hope i don't explain this in a confusing way but here it goes.

Basically I have a form and the form is going to be used as a school grades converter.

Here's an example of the form:

Subject 1 = "Dropdown box here"
Subject 2 = "Dropdown box here"
Subject 3 = "Dropdown box here"
Subject 4 = "Dropdown box here"
Subject 5 = "Dropdown box here"

SUBMIT

The drop downboxes will allow students to choose the grade they got for that specific subject e.g. either grade A, B or C can be chosen for subject 1.

And once they've chosen all their grades for each subject they will click on a submit button and then this is where i'm stuck ....

Each grade will be worth points e.g. Grade A will be worth 50 points, Grade B will be worth 25 points and Grade C will be worth 10 points and i want to know how to get the form to recognize what each letter is worth so let's say a student gets A's for all 5 subjects and then they click submit, i then want it to say they have gained a total of 250 points.

So in reality i'd want the form to be adding 50 + 50 + 50 + 50 + 50 instead of A + A + A + A + A

Thank you for your help!x
 
Back
Top