This line of code currently works:
echo"<td><a href=deleteuser.php?id=".$row['id'].">Delete</a></td>";
And I am trying to add the "onclick="return confirm('Are you sure?');"
However, it is throwing syntax errors where ever I place it.
Thank you
This line of code currently works:
echo"<td><a href=deleteuser.php?id=".$row['id'].">Delete</a></td>";
And I am trying to add the "onclick="return confirm('Are you sure?');"
However, it is throwing syntax errors where ever I place it.
Thank you
 
    
    It should be:
echo "<td><a href='deleteuser.php?id=".$row['id']."' onclick=\"return confirm('Are you sure?')\">Delete</a></td>";
You need to escape the double quotes that are inside the string, so they don't end the string.
 
    
    You need to figure out the best way to use your apostrophes and double quotes when they are nested, and escape some sometimes.
You should also get a decent IDE, as they show syntax highlighting and where you have gone wrong :)
Try this:
echo '<td>
          <a href="deleteuser.php?id='.$row['id'].'" onclick="return confirm(\'Are you sure?\');">Delete</a>
     </td>';
