I have this PHP application where a user Student can view and apply for Internships that the other user Employer can post. Screenshot of the Student Dashboard. The problem is:
If the student has already applied for an internship, he should be restricted from applying again. This is the form when Apply is clicked
This is the PHP code for the form-page:
`
$name=$_POST['name'];
$email=$_POST['email'];
$employer=$_POST['employer'];
$title=$_POST['title'];
$query="INSERT INTO student_applications(name,email,employer,job_title) VALUES('$name','$email','$employer','$title')";
$result=mysqli_query($conn,$query);
if($result)
header("Location: student-profile.php");
else
header("Location: register_intern.php");
?>`