<?php session_start();
include ("includes/head.php");
include ("includes/config.php");
$sessionusername=$HTTP_SESSION_VARS['username'];
$profile_id = $_GET['profile_id'];
$sql = mysql_query("SELECT * FROM users WHERE id='$profile_id'");
//$i=0;
//while ($i < $num) {
$id=mysql_result($sql,$i,"id");
$username=mysql_result($sql,$i,"username");
$firstname=mysql_result($sql,$i,"firstname");
$lastname=mysql_result($sql,$i,"lastname");
$lastupdated=mysql_result($sql,$i,"lastupdated");
$points=mysql_result($sql,$i,"points");
$dob=mysql_result($sql,$i,"dob");
$status=mysql_result($sql,$i,"status");
$occupation=mysql_result($sql,$i,"occupation");
$details=mysql_result($sql,$i,"details");
$picture=mysql_result($sql,$i,"picture");
$band=mysql_result($sql,$i,"band");
$otherbands=mysql_result($sql,$i,"otherbands");
//$i++;
//}
$detailsbr=nl2br($details);
$otherbandsbr=nl2br($otherbands);
echo "<div id='whatis'><h1><center>$username (<a href='store.php'>$points</a>)</center></h1></div>
<table width='100%' border='0'>
<tr>
<td width='27%' height='89'><img src='profileimages/nia.gif'></td>
<td width='3%'>ย </td>
<td width='70%'>
<table width='80%' border='0'>
<tr>
<td class='qs'>Name</td>
<td>$firstname $lastname</td>
</tr>
<tr>
<td class='qs'>Date of birth</td>
<td>$dob</td>
</tr>
<tr>
<td class='qs'>Marital status</td>
<td>$status</td>
</tr>
<tr>
<td class='qs'>Occupation</td>
<td>$occupation</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>ย </td>
<td>ย </td>
<td>ย </td>
</tr>
<tr>
<td class='qs'>Favourite band</td>
<td>ย </td>
<td>$band</td>
</tr>
<tr>
<td class='qs'>Favourite things</td>
<td>ย </td>
<td>$otherbandsbr</td>
</tr>
<tr>
<td class='qs'>ย </td>
<td>ย </td>
<td>ย </td>
</tr>
<tr>
<td colspan='3'></td>
</tr>
<tr>
<td colspan='3'>$detailsbr</td>
</tr>
</table><br><br>";
if ($username==$sessionusername) {echo "<center><a href='editprofile.php' style='font-size:12px'>EDIT</a></center>"; }
// else {echo "<center><a href='editprofile.php' style='font-size:12px'>ADD THIS USER TO MY FRIENDS LIST </a></center>"; }
echo "<hr>
<font size='1' color='#dddddd'>Last updated: $lastupdated</font>";
include ("includes/foot.php");
?>