Hi, just tried this
$limit = 20;//Limit of results here
$page = $_GET['page'];//Gets the page
echo $myid;
if(empty($page))//If the page is empty
{
$page = '1';//sets the page to 1
};
$start = ($page-1)*$limit;//set the start page
$start = round($start,0);//rounds it
$sql = "SELECT * FROM users WHERE username='$username'";
echo $sql; /* Make sure you have the expected statement */
$result = mysql_query($sql) or die(mysql_error()); /* See what mysql thinks about it */
while ($r = mysql_fetch_array($result))
{
$sentusername=mysql_query("SELECT username FROM users WHERE id='$r[id]'");
echo "<table>";
echo "<tr>
<td width=195 height=9><a href=profile.php?id=$r[id]>$sentusername</a></td>
<td width=205>$r[subject]</td>
<td width=160>$r[timesent]</td>
<td width=83></td>
<td width=92></td>
<td width=98></td>
<td></td></tr>";
};
and i didnt get any errors, but it didnt work i got this
7SELECT * FROM users WHERE username='haktar'
Resource id #5
Resource id #5 ( this is where $sentusername should be)