Hi there
This is a bit of a strange issue, well it is to me being a newbie lol.
I'll start with my code:
Code: Select all
<?
$num=3;
$width=100/$num;
$cnt=0;
$items="<table border='0' cellpadding='0' cellspacing='0' align='center'><tr>";
$taa=0;
if(mysql_num_rows($online_sql) > 0) {
while ($online = mysql_fetch_array($online_sql)) {
$taa++;
if ($cnt==$num){
$items.="</tr><tr>";
$cnt=0;
}
$items.="<td style='padding-bottom:20px; padding-right:20px;'>
<table class='border' bgcolor='#000000'>
<tbody>
<tr>
<td style='height:190px;'><a href='".processLink($online["product_id"], $online["name"])."'><img alt='".$online["name"]."' border=0 src='makethumb.php?pic=product_images/".$online["filename"]."&w=122&sq=N' /></a><br /><div align='center'><a href='".processLink($online["product_id"], $online["name"])."'>".$online["name"]."</a>
</td>
</tr>
</tbody>
</table>
</td>";
$cnt++;
$items.="</tr></tbody></table>";
print $items;
}
} else {
print "<center>We're sorry, but no one is online </center>";
}
?>
<?
if (!isset($_GET["id"])) $_GET["id"]='';
if ($_GET["id"]!=''){
require "profiles.php";
} else {
$engine->load();
}
?>I think that the profile is loaded by this code: $engine->load(); which is shown in the above code. I think it calls a module and essentially includes a PHP file (which holds the profile for the person). The link to the profile is in this format: http://www.mysite.com/JONATHAN,217. I guess that its getting the user name and ID?
The problem is that the profile is being loaded directly into the index.php file underneath all the images. What I need to do is try to clear the images first, and then load the profile, all within the index.php page, or on a separate page. It just looks a mess when the profile is loaded underneath the images.
I tried to add some kind of page counter, but realised that wouldn't work. Could I not add the above code to the link that is processed using 'onclick' and call a separate file called user_profile.php? My problem is getting the data into a link format using PHP. Or maybe use the $engine->load(); within the link?
Or does anyone have any better ideas? I'm sure there must be something else I can do, for example, is there no function to load a php file in the else statement, or redirect to another file?
Any help would be great.
kind regards
Jonathan
Mod | Please use [ code=html ], [ code=php ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: