I tried everything I could find online to get it to work, I tried casting $employeeid to int after retrieving it from the link (even though they say mysql does it for you), i tried using nested single quotes, escape quotes... the print line happens to work, and employeeid shows up as a number in the hyperlink when delete is clicked, but it never deletes. what could I be doing wrong?
also, I could've sworn the onclick="return confirm("")" in the hyperlink was supposed to cause a pop up to appear, but it didnt, am I forgetting something here as well or is it a syntax issue?
this is my php link that calls it:
<td><a href='employ.php?delete=yes&employeeid=$employeeid onclick=\"return confirm(\"Are you sure\")\"'>Delete</a></td>
and this is the code section that is supposed to handle it:
if(isset($_GET['delete']))
{
$temp = $_GET['$employeeid'];
print "teseting delete<br><br>";
$query = "DELETE FROM employees WHERE employeeid = ".$temp;
mysqli_query($link, $query); //link query to database
print "Employee Updated"; // print confirmation
}
print_r($_GET);at the top to confirm that the data passes??$temp = $_GET['$employeeid'];with$employeeid = $_GET['employeeid'];then doWHERE employeeid = ".$employeeid;