Hi all,
Could someone help me how to delete the rows for the listed row below? How do I write the codes at this line? I want to click on 'Delete' to delete the specific row.
<td colspan="2" align="right">Delete</td>
Many thanks
nma
[PHP]
<?php
session_start();
if(!isset($_SESSION['user'])) {
header('Location: /..');
die();
}
?>
<?php
include_once('../ez_sql.php');
if($_GET['eventID'] == 0){
if(isset($_GET['noteID'])){
$noteID = $_GET['noteID'];
$notes = $db->get_results("select MovieNotes.*,UserLogin.username from MovieNotes left join UserLogin on MovieNotes.userID=UserLogin.userID where noteID=$noteID order by noteDate desc");
}
else{
$movieID = $_GET['movieID'];
$notes = $db->get_results("select MovieNotes.*,UserLogin.username from MovieNotes left join UserLogin on MovieNotes.userID=UserLogin.userID where movieID=$movieID order by noteDate desc");
}
}
else {
if(isset($_GET['noteID'])){
$noteID = $_GET['noteID'];
$notes = $db->get_results("select EventNotes.*,UserLogin.username from EventNotes left join UserLogin on EventNotes.userID=UserLogin.userID where noteID=$noteID order by noteDate desc");
}
else {
$eventID = $_GET['eventID'];
$notes = $db->get_results("select EventNotes.*,UserLogin.username from EventNotes left join UserLogin on EventNotes.userID=UserLogin.userID where eventID=$eventID order by noteDate desc");
}
}
if(count($notes) == 0) {
die();
}
foreach($notes as $note) {
?>
<table width="400">
<tr>
<td colspan="2" width="200" class="eventEntryText">
<strong><?php echo $note->noteDate?> </strong> -- <?php echo $note->username?> <br /><?php echo $note->noteText?><br />
</td>
</tr>
<tr>
<td colspan="2" align="right">Delete</td>
</tr>
<tr>
<td colspan="2" height="5"><img src="iframe-borderline.jpg" width="400" height="5"/></td>
</tr>
</table>
<?php
}
?>[/PHP]