Interaction design • webdevelopment • web art • photography
Java alert message | yahoo.com,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: <? include("config.php"); $id=$_GET['id']; $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>"; ?> |
|
218.208.19.2 |
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> |
|
milov.demon.nl |
Pages: 1 |
---|