I tried a lot but it, again and again, showing same error:
Fatal error: Uncaught Error: Array callback must have exactly two elements",
error is showing on line no.2
if($_SERVER(['REQUEST_METHOD'] == 'POST')){
I tried a lot but it, again and again, showing same error:
Fatal error: Uncaught Error: Array callback must have exactly two elements",
error is showing on line no.2
if($_SERVER(['REQUEST_METHOD'] == 'POST')){
$_SERVER
is not a function, its an array, you need to remove ()
after $_SERVER
, and your code will look like below
if($_SERVER['REQUEST_METHOD'] == 'POST'){ ... }
PS: as everyone said , your script is open to SQL Injection Attack and Never store passwords in the database as Plain Text. Please follow the guidelines on the comments