'Fatal error: Uncaught Error: Array callback must have exactly two elements [closed]

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')){  
php


Solution 1:[1]

$_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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tushar