Jump to content
MakeWebGames

View Gang Profile Error


Esquilache

Recommended Posts

  • 3 weeks later...

I got this:

view_gang.php

<?php 
$sql = "SELECT * FROM gangs WHERE name='".mysql_real_escape_string($_GET['name'])."'";
$query = mysql_query($sql)  or die(mysql_error());
$row = mysql_fetch_object($query);
$gang_name = htmlspecialchars($row->name);
$gang_members = htmlspecialchars($row->members);
$gang_leader = htmlspecialchars($row->leader);
$gang_quote = htmlspecialchars($row->quote);
$gang_picture = htmlspecialchars($row->picture);

?>
<fieldset style="color: #000000; border: 1px solid #000000; width: 300px; text-align: left; padding: 5px;">
<legend style="color: #999999; font-weight: bold;">Profile for: <?php echo $gang_name; ?>.</legend>
<b>Leader: </b><?php echo "<a href=\"page.php?page=view_profile&name=". $gang_leader ."\" onFocus=\"if(this.blur)this.blur()\">".$gang_leader."</a>"; ?><br />
<b>Members: </b><?php echo $gang_members; ?><br />
<hr class="hr" />
<?php

$sql = "SELECT name FROM login WHERE  gang='".mysql_real_escape_string($gang_name)."' AND name!='".mysql_real_escape_string($gang_leader)."' ORDER BY name ASC";
$query = mysql_query($sql);
$count = mysql_num_rows($query);
$i = 1;

while($row = mysql_fetch_object($query)) {
$member_name = htmlspecialchars($row->name);

echo "<a href=\"page.php?page=view_profile&name=". $member_name ."\" onFocus=\"if(this.blur)this.blur()\">".$member_name."</a>";

if($i != $count) {
 echo "<label> - </label>";
}
$i++;
}
?>
<hr class="hr" />
</fieldset>
<br />
<?php if(!empty($gang_quote) or !empty($gang_picture)){ ?>
<br />
<fieldset style="color: #000000; border: 1px solid #000000; width: 600px; text-align: left; padding: 5px;">
<legend style="color: #999999; font-weight: bold;">Quote.</legend>
<?php 	

if(!empty($gang_picture)){
echo "<center><img src=\"http://".$gang_picture."\" border=\"0\" /></center><br />";		
}

$gang_quote = htmlentities($gang_quote);
   $gang_quote = nl2br($gang_quote); 
   $gang_quote = bbcodes($gang_quote);
$gang_quote = smilie($gang_quote);
$gang_quote = sitefilter($gang_quote);
$gang_quote = stripslashes($gang_quote);
echo $gang_quote; ?>
</fieldset>
<?php } ?> 

 

Not sure if this is the correct one...

Link to comment
Share on other sites

  • 5 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...