I understand the basics of PHP enough to make forms and such and even a little to do calculations, but I've run into a little bit of a snag. What seemed like it would be extremely simple has advanced to a little more than I could chew. I can't figure out how to set a letter(grades, i.e. a b c d f) equal to its corresponding value(a=4, b=3, c=2, d=1, f=0). Simple for most of you... I can't seem to put it in the right order nor figure out a way to successfully calculate it with all the properties for the GPA.
If you aren't aware the way to calculate a GPA is you have a set number of classes(1-6) and each class you get a grade, ABCDF, add the variables together then divide by the number of classes.
It is set like this: a=4 b=3 c=2 d=1 f=0 x=classes(1-6)
GPA= grade from each class added together/x
Trouble is I have to make a html dropdown list stating 1-6 then having it list several forms underneath(# of forms depends on dropdown list) and having each grade be entered as the letter itself and have a calculate button that will add the values then divide by the number of classes... I don't know how to retain the # of classes on the same page.
I have no idea how to make it organized but if you have ideas, please let me know.
I have been trying for hours on this, I really need tips and examples and solutions. I'm a n00b at this web design in general and I know this is a large endeavor but I hope to learn a lot from it.
Thank you very much for helping/considering to help.