so if any1 could tell me where i went wrong and fix the destructive code it would be awsome.
THE CODE:
Code: Select all
<html>
<head>
<link rel='stylesheet' rel='text\css' href='forum/fstyle.css'>
</head>
<body link="#990000" vlink="#CC0000">
<table BACKGROUND="images/pnl.png">
<center><h1> Profile </h1></center><div id='holder'>
<div id='profile'>
<?php
include "connect.php";
$id = $_GET['user_id'];
$selid = $id - 5;
$sid = $id + 2;
$get = "SELECT * FROM users WHERE id='$selid'";
$query = mysql_query($get)or die(mysql_error());
$array = mysql_fetch_array($query)or die(mysql_error());
$friends = $array['friends'];
$name = $array['name'];
$image = $array['picid'];
$posts = $array['posts'];
$date = $array['date'];
$title = $array['title'];
$rank = $array['rank'];
$size = 500;
$hide = md5(rand(9999999,0));
$fary = array($friends);
$frnds = implode("<br/>",$fary);
echo "<br/><img class='floatright' src='$image' alt='' width='$size' height='$size'>";
echo "<big>Name: $name</big><a href='add_freind.php?user_id=$sid'> add as a friend</a></big><br/>";
echo "<big>Posts: $posts</big><br/>";
echo "<big>Joined at: $date</big><br/>";
echo "<big>Title: $title</big><br/>";
echo "<big>Rank: $rank <br/>";
echo "<big>Friends: </big>";
for($j=0;$j<$fary;$j++){
$f1 = $frnds[2];
echo "<br/><a href='user.php?user_id=$sid&$hide'>$f1</a>";
}
?>
</div></div>
</table>
</body>
</html>