PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a page where the sure can cancel a booking and want a message bot to appear to check they really want to do this. I put sone code in which works is just in html but isn't bringing up a message box .
The code I am using is as follows
print "<a href ='delete.php?id=$bookingid' onclick='if (confirm('Are you sure you want to cancel this booking? or \nCancel if you do not want to. ')){return true}else{return false}'>Cancel</a>";
<a href ='delete.php?id=$bookingid' onclick='if (confirm('Are you sure you want to cancel this booking? or \nCancel if you do not want to. ')){return true}else{return false}'>Cancel</a>
print "<tr><td>$courseid</td><td>$name</td><td>$email</td><td>$phone</td><td>$add</td><td>$postcode</td><td>$company</td><td>$datebooked</td><td><p><a href ='delete.php?id=$bookingid' onclick='if (confirm(\'Are you sure you want to cancel this booking? or Cancel if you do not want to. \')){return true}else{return false}'>Cancel</a></p></tr>";
print "<tr><td>$courseid</td><td>$name</td><td>$email</td><td>$phone</td><td>$add</td><td>$postcode</td><td>$company</td><td>$datebooked</td><td><p><a href ='delete.php?id=$bookingid' onclick=\"if (confirm('Are you sure you want to cancel this booking? or Cancel if you do not want to. ')){return true}else{return false}\">Cancel</a></p></tr>";