Hey all. I am using MAMP as my local server and I have a folder with 5 images in it named image1-5.png. We have to make a simple grading forum where you put in the grade and you get the letter grade back. I just wanted to diplay image 1 for a’s image 2 for b’s and so on but Im having trouble with the syntax to call the image and a conditonal statment to display the right image for the associated grade. Her is my code:
<?php $score="0"; $letter=""; $score=$_REQUEST['score']; IF ($score>92) {$letter="A";} ELSE IF ($score>89) {$letter="A-";} ELSE IF ($score>86) {$letter="B+";} ELSE IF ($score>82) {$letter="B";} ELSE IF ($score>79) {$letter="B-";} ELSE IF ($score>76) {$letter="C+";} ELSE IF ($score>72) {$letter="C";} ELSE IF ($score>69) {$letter="C-";} ELSE IF ($score>66) {$letter="D+";} ELSE IF ($score>62) {$letter="D";} ELSE IF ($score>59) {$letter="D-";} ELSE {$letter="F";} ECHO "Your Letter Grade Is: $letter"; ?>Sorry Im such a noob thanks for the help