PHP

PHP: Select from Database Error

$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);

This line:

"SELECT * FROM Interns WHERE email='$email';"
  1. There should be quotes around $email
  2. There should be an ; at the end of the line

It wouldn’t work without either.

Standard