probeer een pm-systeem te maken, alleen heb al vanalles geprobeerd en ik weet niet hoe ik de juiste berichten bij de juiste personen bezorgt krijg.
dit is de code
dit is de code
PHP:
<?php
if($id){
$sql1 = mysql_query('SELECT * FROM pmberichten WHERE ontvanger='.$id.' ORDER BY id DESC');
?>
<form action="" method="post">
<table class="inbox" cellpadding="0" cellspacing="0">
<tr>
<td><h1><b>Postvak - Inbox</b></h1></td>
</tr>
</table>
<table class="inbox" cellpadding="0" cellspacing="0">
<tr>
<td colspan="6" align="center"><img src="plaatjes/inbox.png" align="bottom"> <a href="<? print url_implode('1.ingelogt/pm/inbox')?>">Inbox</a> <img src="plaatjes/nieuw.png" align="bottom"> <a href="<? print url_implode('1.ingelogt/pm/nieuw')?>">Nieuw Bericht</a> <img src="plaatjes/verzonden.png" align="bottom"> <a href="<? print url_implode('1.ingelogt/pm/verzonden')?>">Verzonden Berichten</a></td>
</tr>
</table>
<table class="inbox" cellpadding="0" cellspacing="0">
<tr>
<td class="spacer"></td>
</tr>
<tr>
<td class="inbox_title "width="25px"><b>Nr</b></td>
<td class="inbox_title"><b>Verzender</b></td>
<td class="inbox_title"><b>Onderwerp</b></td>
<td class="inbox_title"><b>Datum</b></td>
<td class="inbox_title"><b>Tijd</b></td>
<td class="inbox_title"></td>
</tr>
<?
if($obj1 = mysql_num_rows($sql1)){
while($obj1 = mysql_fetch_array($sql1)){
echo '<tr>
<td>#'.$obj1['id'].' <img src="plaatjes/lezen.png" border="0" align="top"> Lezen</td>
<td>'.$obj1['verzender'].'</td>
<td>'.$obj1['onderwerp'].'</td>
<td>'.$obj1['datum'].'</td>
<td>'.$obj1['tijd'].'</td>
<td><input type="image" src="plaatjes/verwijderen.png" name="verwijderen"></td>
</tr>';
}
} else {
echo '
<tr>
<td colspan="7">Er zijn geen nieuwe berichten</td>
</tr>';
}
}
?>
</table>