Interaction design • webdevelopment • web art • photography : forum : coding : 'Java alert message'

Java alert message,anastasia1203,anastasia, 050422 05:35
Please help me...
I'm a new in php

I want to confirm first before delete the data in mysql. I want to put the message box for ok & cancel.

This is my script to delete:

$result = mysql_query("DELETE FROM asset WHERE id='$id' ",$connect);

echo "<b>News Deleted!<br>You'll be redirected to Home Page after (1) Seconds";
//header("location: index1.php");
echo "<meta http-equiv=Refresh content=1;url=index1.php>";
Re: Java alert message Milo, 050422 10:05
if you want to show a Javascript OK/Cancel message box, you can add an onclick-event to the link that points *to* your php script, like so:
<a href="yourscript.php?id=123" onclick="return confirm('Are you sure you want to delete this?');">delete</a>
Pages: 1