-1

Why does this code throw an error?

<?php
if(isset($_POST['aca'])){
    header("location:Academic");
}elseif(isset($_POST['ed'])){
    header("location:EnjoyDev");
}elseif(isset($_POST['hb'])){
    header("location:Hoverboard");
}elseif(isset($_POST['lc'])){
    header("location:LiveChat");
}elseif(isset($_POST['mp']){
    header("location:myPro");
}elseif(isset($_POST['ym'])){
    header("location:YatMath");
}
?>

LINE 121: }elseif(isset($_POST['mp']){
I didn't miss any semicolons.

1 Answers1

2

LINE 121:

}elseif(isset($_POST['mp']){

should be

} elseif( isset($_POST['mp']) ) {

Also, I would suggest that you make use of spaces to improve your codes' readability. You wouldn't have made this mistake then.

Shammi Shailaj
  • 445
  • 5
  • 14