Hello all,
I'm want to do a PHP redirect within a <DIV>.
Currently I have written the folowing code, that allows a database entry to be selected and be deleted.
<?php
//This is from a file named delete.php
$sql="SELECT * FROM $tbl_name";
$result=mysql_query($sql);
if(isset($_POST['delete'])) {
foreach($_POST['checkbox'] as $id){
mysql_query("DELETE from $tbl_name WHERE id =$id LIMIT 1");
}
}
if($result){
[B]echo "<meta http-equiv=\"refresh\" content=\"0;URL=viewdiary.php\">";[/B]
}
?>
I have highlighted the code that redirects from the delete.php to the page viewdiary.php.
What I want to accomplish is let this run in a div.
Note that my div id is the following
<div id='news1'>
I am using the following jquery statement.
<a href="#" onclick="ajax_loadContent('news1','index.php');return false">My Diary</a>
This works fine and to elaborate it allows me to load content into a <DIV> area, but obviousy I need to incorporate this into the above mentioned code.
Please help and thank you in advance.
Rosekrans