To get the url of current script’s directory:
$script_url = "http://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; $dir_url = preg_replace("/[^\/]*.php/", "", $script_url);
To get the url of current script’s directory:
$script_url = "http://".$_SERVER['SERVER_NAME'].$_SERVER['SCRIPT_NAME']; $dir_url = preg_replace("/[^\/]*.php/", "", $script_url);
$link = mysqli_connect("localhost", "root", "root"); $result = mysqli_select_db($link, 'internship'); $email_duplicate = "SELECT * FROM Interns WHERE email='$email';"; $result = mysqli_query($link, $email_duplicate);
if ($_SERVER['REQUEST_METHOD'] === 'POST') {...}
The POST
part is all CAPITAL.