I have produced the code below however I am getting the error in the title and have no idea what it means, I think its the only thing stopping the code from running. Any help please! Ive been looking for ages and I cannt find the mistake!
Expand|Select|Wrap|Line Numbers
- <title> Grade Point Converter </title>
- </head>
- <body>
- <h1>Use the form below to work out your grade point</h1>
- <br>
- <form method="post" action=" <?echo $_SERVER[ "PHP_SELF" ]?>">
- Grade:
- <input type="text" Name="grade"> % <br>
- Convert from <br>
- <Input type = 'Radio' Name ='scale' Value= 'Undergraduate' checked>
- Undergraduate Modular Framework Awards <br>
- <Input type = 'Radio' Name ='scale' Value= 'HND'>
- HND - Current Scheme <br>
- <Input type = 'Radio' Name ='scale' Value = 'Masters'>
- Masters
- <P>
- <Input type = "Submit" Name = "Submit" Value = "Submit grade">
- </form>
- <?PHP
- if (isset($_POST['Submit'])) {
- //actions when form is submited to post to itself
- $grade = $_POST['grade'];
- $scale = $_POST['scale'];
- // actions define $grade and $scale for use later
- if ($scale=='Undergraduate')
- // Identifies the selection as undergraduate
- $a=$grade;
- $b="";
- if ($a >= 70){
- $b = "13 - 15 which is a First Class Honours";
- }elseif ($a >= 60){
- $b = "10 - 12 which is a Upper Second Class Honours";
- }elseif ($a >= 50){
- $b = "7 - 9 which is a Lower Second Class Honours";
- }elseif ($a >= 40){
- $b = "4 - 6 which is a Third Class Honours";
- }else{
- $b = "0 - 3 which is a Fail";
- }
- echo " $a % is equal to grade point $b using the undergraduate modular framework";
- }
- else if ($scale=='HND')
- // Identifies the selection as HND
- $a=$grade;
- $b="";
- if ($a >= 70){
- $b = "13 - 15 which is a Distinction";
- }elseif ($a >= 53){
- $b = "8 - 12 which is a Merit";
- }elseif ($a >= 40){
- $b = "4 - 7 which is a Pass";
- }else{
- $b = "1 - 3 which is a Fail";
- }
- echo " $a % is equal to grade point $b using the HND framework";
- else if($scale=='Masters')
- // Identifies the selection as Masters
- $a=$grade;
- $b="";
- if ($a >= 70){
- $b = "13 - 15 which is a Distinction";
- }elseif ($a >= 60){
- $b = "10 - 12 which is a Merit";
- }elseif ($a >= 50){
- $b = "7 - 9 which is a Pass";
- }elseif ($a >= 40){
- $b = "4 - 6 which is a Compensatable Failure";
- }else{
- $b = "1 - 3 which is a Fail";
- }
- echo " $a % is equal to grade point $b using the Masters framework";
- }
- ?>
- </body>
- </html>