I have an onclick on my href when clicked inside the echo function. But then it immediately deletes the data directly without prompting the confirmation dialog. my process php that accepts the delete value also gives the header to another page( specifically, this code is in another php namely search, for search results, and in the process php, it has the header location to userlists, contains all users.) Here is my code.
echo '<a href="process.php?delete='.$row['stylist_id'].'"
class="btn btn-danger" onclick="return confirm('.$confirmLetter.');">Delete</a></center>';
at first this was also my code but it says error in looking for TSRING needing , or ;
echo '<a href="process.php?delete='.$row['stylist_id'].'"
class="btn btn-danger" onclick="return confirm('Are you sure?');">Delete</a> </center>';