Hi all,
Instead of passing the variables to the other page and coding mysql queries there.. Is it possible that we can use the mysql(DELETE...) query within the anchor tags in the same page?
<a href >... to delete a particular row in mysql table?
Like having a link called delete and by clicking on that , a particular row must be deleted in the table.
eg:- <a href = " .... some mysql query....">DELETE</a>
(or)
eg:- <a href="<?php //delete this row ?>">delete</a>
(or)
eg:-
<?php
//db connections..
$result = mysql_query("SELECT commentid FROM comments")
or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
?>
<a href="<?php //delete this row ?>">delete</a>
<?php } ?>
Instead of passing the variables to the other page and coding mysql queries there.. Is it possible that we can use the mysql(DELETE...) query in the same page?
I was wondering if there is some possibility like this in PHP .
Please let me know if there are any such methods .
Thankyou all in Advance.