Run SQL query when click on OK button of warning message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,
 
I am printing a _javascript_ warning message. On pressing OK button, I want to run an sql query. Below is the way I have tried but sql query is running either press OK or Cancel button on warning message or even refresh the page (F5). Also redirection, when press OK, also not working.
 
 
Am I using the right approach? Could any 1 please help me to sort this problem.
 
 
Regards,
 
Nasreen  
 
 
 
<tr><td>
<input type="button" DELETE FROM artist where aid = '$id'";
   mysql_query($sqldel) or die(mysql_error());
   //header("Location: artist.php"); 
   //window.location="
http://www.yahoo.com/"
  ?>  
 }
 else
 {
  window.location='index.php'
  }" value="DELETE">
</td></tr>


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux