Parse error: syntax error, unexpected '$email'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shalaw
    New Member
    • Jul 2019
    • 1

    Parse error: syntax error, unexpected '$email'

    how can id fix this error from this code

    <!DOCTYPE html>
    <html>
    <head>

    </head>
    <body>

    <form method="POST">

    <input type="email" name="email" placeholder="em ail" ><br><br>

    <input type="submit" name="Delete" value="Delete">


    </form>

    </body>
    </html>


    <?php

    require connection.php


    $email;
    $sqlDelete = "DELETE FROM `users` WHERE `email`= ' ".$email." ' ";

    $result = mysql_query($co n, $sqlDelete);

    if($result) {

    echo ('Successfully Deleted');
    }
    else
    {
    echo('Not Delete Successfully');
    }



    ?>
Working...