Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

how to get popup after clicking delete link ?

$
0
0

PLEASE HELP ME OUT....

 

Following code deleting my data without getting any popup window...
 

this is link code:

 

echo ("<td><a href=\"delete.php?number=$row[ID]\" onclick=\"myFunction();\">Delete</a></td></tr>");

 

 

this is function code:

 

<script type="text/javascript">
function myFunction()
{
var y=window.confirm("Do you really want to DELETE ?");
if(y==true)
{
 
<?php
$order = "DELETE FROM budget WHERE ID='$no'";
$result=mysql_query($order);
if(isset($result))
{
print "submitted successfully "; echo "<br/>";
printf ("Updated records: %d\n", mysql_affected_rows()); echo "<br/>"."<br/>";
echo "<br/>";
  echo "want to DELETE one more?"; echo " ";
  echo "<a href=\"editstart.php\">Click here</a>"; echo "<br/>"; echo "OR"; echo "<br/>";
  echo "<a href=\"home.php\">Click here to go to HOMEPAGE</a>"; echo "<br/>";
}
 
?>
}
else
{
document.write("cancel");
window.location("#");
}
}
</script>

Viewing all articles
Browse latest Browse all 13200

Trending Articles