-4

Parse error: syntax error, unexpected 'if' (T_IF) on line 4

I really don't know what is wrong with my code or why this is happening because I am new to PHP.

Line 4 is: if($passcheck == $mypass){

    <?php
    $mypass="DaPigeon123";
    $passcheck=$_POST["password"]
    if($passcheck == $mypass){
    echo "Welcome," .$_POST["username"]. "! You are now logged in.<br/>";
    {
    else
    echo "Sorry, wrong password. <br/>";
    ?>

1 Answers1

0

Missing semicolon on line3. Seriously, consider taking a basic php course.

venkatKA
  • 2,399
  • 1
  • 18
  • 22