Jump to content

Recommended Posts

ok, I've worked a LOT on the codes and have come to this

Parse error: syntax error, unexpected T_IF in /home/klrbal/public_html/Mafia-test/tempfam.php on line 206

 

<?php
session_start();

if(!(isset($_SESSION["real_name"]))) {
  //echo "I'm not logged in";
  header('Location: index.php');
  } else {
  echo "";
  }
?>
<html>
<head>
<title>Mafia Syndicate BETA .::. Families</title>
<link REL="stylesheet" TYPE="text/css" HREF="main.css">
<script language=javascript src=Menus.js></script>
</head>

<body background="wallpaper.jpg">
<center>
<table border="0" cellspacing="0" cellpadding="0" align="center" width="95%" class="cat">
<TR>
<TD width="150" background="tdbg3.jpg" bgcolor="#222222" valign="top"><?php include("leftmenu.php");?></TD>
<td width="100%" valign="top"><br>
<?php
$fetch=mysql_fetch_object(mysql_query("SELECT * FROM crews WHERE name='$crew' LIMIT 1"));

////CREATE CREW/////
if($_POST['createfamily'] && $_POST['familyname']) {
  $familyname == $_POST['familyname'];
  if($rankpoints <= 140109) {
    echo "You must be Underboss before you can make a crew!";
    } else {
    if($crewlevel==0) {
      $finalcash = $cash - 500000000000 ;
      if($finalcash <0) {
        echo "You do not have enough cash!";
        } elseif($finalcash >=0) {
        $num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE id >1"));
if($num_true >= 5) {
  echo "There are already 5 Crew Slots!";
  } else {
          $num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE name='$familyname'"));
  if($num_true >= 1) {
            echo "There is already a Family with that name!";
    } else {
            function change($msg) {
      $post = $msg;
      $post = str_replace("'", "`", $post);
      return $post;
      }
            $new=change($crewname);
            mysql_query("INSERT INTO `family` ( `id` , `owner` , `name` , `bank` , `quote` , `news` , `slot` ) VALUES ('', '$username', '$new', '0', 'No Quote!', 'You have no family news8)', '50')");
            mysql_query("UPDATE users SET famlevel='9' WHERE username='$username'");
            mysql_query("UPDATE users SET cash='$finalcash', family='$new'  WHERE username='$username'");
            mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Bought a Family called <b>$new</b>!', '$date', '$realip')");
            echo "You have created the Family <b>$new!</b>";
            }
          }
        }
      }
    }
  }

if($_POST['cancelapply']) {
  mysql_query("DELETE FROM famreq WHERE username='$username'");
  echo "You have cancelled your application!";
  }


/////END OF CREATE CREW!!!/////

if(famlevel >= 2);
  if($_POST['inviteuser'] && strip_tags($_POST['inviteusername'])) {
    $sql2="SELECT * from famreq WHERE username='$username'";
    $result2=mysql_query($sql2);
    $num_true=mysql_num_rows($result2);
    if($num_true >= 1) {
      echo "You have already pending Family request!";
      } elseif($num_true <=1) {
      $crewnamejoin = $_POST['inviteusername'];
      $crewnamejoin = strip_tags($inviteusername);
      $sql="SELECT * FROM users WHERE username='$username'";
      $result=mysql_query($sql);
      if($_POST['acceptinvite']) {
        $sql="SELECT * from famreq WHERE family='$famid'";
$result=mysql_query($sql);
        mysql_query("INSERT INTO `famreq` ( `id` , `famid` , `username` , `status` , `f` ) VALUES ('', '$invitedusername', '$username', '$status', '$f' )");
        echo "You have requested $invitedusername to join your family!";
        }
      }
    }
    if($_POST['leave'] && $famlevel >=2 && $famlevel <7){
      if($famlevel <= 0) {
        echo "You are not in a Family!";
        } else {
        if($famlevel >= 4) {
          echo "You can not leave your family!";
          if($_POST['change'] && strip_tags($_POST['newfamname']) && strip_tags($_POST['famid']) && $userlevel >=10) {
            $newcrewname = $_POST['newfamname'];
            $newcrewname = strip_tags($newfamname);
            $crewid = $_POST['famid'];
            $crewid = strip_tags($famid);
            $sql="SELECT * from family WHERE id='$famid'";
            $result=mysql_query($sql);
            while($rows=mysql_fetch_array($result)) { // Start looping table row
              $oname = $rows['name'];
              }
            }
          }
        }
      }
            $num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE name='$newfamname'"));
            if($num_true >= 1) {
            echo "There is already a family with that name!";
            } else {
            function change($msg) {
              $post = $msg;
              $post = str_replace("'", "`", $post);
              return $post;
              }
            $newfamname=change($newfamame);
            mysql_query("UPDATE users SET famname='$newfamname' WHERE famname='$oname'");
            mysql_query("UPDATE famreq SET famid='$newfamname' WHERE famid='$oname'");
            mysql_query("UPDATE forum_answer SET place='$newfamname' WHERE place='$oname'");
            mysql_query("UPDATE forum_question SET place='$newfamname' WHERE place='$oname'");
            mysql_query("UPDATE family_donations SET fam='$newfamname' WHERE famname='$oname'");
            mysql_query("UPDATE family SET famname='$newfamname' WHERE id='$crewid'");
            mysql_query("UPDATE BG SET crew='$newfamname' WHERE crew='$oname'");
            echo "You changed the family $oname to $newfamname!";
            }
          
        if($_POST['dropfam'] && strip_tags($_POST['famnamedrop']) && $userlevel >=15) {
          $crewnamedrop = $_POST['famnamedrop'];
          $crewnamedrop = strip_tags($famnamedrop);
          mysql_query("DELETE FROM crews WHERE name='$crewnamedrop'");
  mysql_query("UPDATE users SET crewlevel='0', crew='None' WHERE crew='$crewnamedrop'");
          mysql_query("DELETE FROM crewapply WHERE crew='$crewnamedrop'");
          mysql_query("DELETE FROM forum_answer WHERE place='$crewnamedrop'");
          mysql_query("DELETE FROM forum_question WHERE place='$crewnamedrop'");
          mysql_query("DELETE FROM crew_donations WHERE place='$crewnamedrop'");
          echo "You have droped <b>$crewnamedrop</b>!";
          }
        if($_POST['acceptbg']) {
          mysql_query("UPDATE BG SET status='Accepted' WHERE bg='$username' AND status='Pending'");
          echo "You are now a bodyguard";
          }
        if($_POST['acceptbg2']) {
          mysql_query("UPDATE BG SET status='Accepted' WHERE bg='$username' AND status='Pending'");
          echo "You are now a bodyguard!";
          }
        if($_POST['upgrade'] && $famlevel >=7 && $fetch->slot <500) {
          if($fetch->slot ==75) {
            $next=125; $upgradecost=10000000000;
            } elseif($fetch->slot ==125) {
            $next=200; $upgradecost=150000000000;
            } elseif($fetch->slot ==200) {
            $next=300; $upgradecost=20000000000;
            } elseif($fetch->slot ==300) {
            $next=500; $upgradecost=30000000000;
            }
          $newcash = $cash - $upgradecost;
          if($newcash <0) {
          echo "You do not have enough cash to upgrade!";
          } else {
          mysql_query("UPDATE family SET slot='$next' WHERE name='$name' AND owner='$username'");
          mysql_query("UPDATE users SET cash=cash-'$upgradecost' WHERE username='$username' AND family='$famname'");
          echo "Your Family size is now <b>$next</b>!";
          }
        }
?>
<table border="1" class="sub2" align="center" cellspacing="0" cellpadding="1" bordercolor=black width=81%>
<tr>
<td align="center" colspan="5" class="header">Crews</td>
</tr>
<?php
      include "includes/db_connect.php";
      $sql="SELECT * FROM family ORDER by id ASC";
      $result=mysql_query($sql);
      while($rows=mysql_fetch_array($result)) { // Start looping table row
        $name=$rows['owner'];
        $famname=$rows['id'];
        $famname2=$rows['name'];
        $sql2="SELECT * from users WHERE family='$famname2'";
        $result2=mysql_query($sql2);
        $num=mysql_num_rows($result2);
        }
?>
<tr>
<td width="70%"><a href="viewcrewprofile.php?viewcrew=<?php echo $famname ?>"><?php echo $rows['name']; ?></a></td>
<td width="20%"><a href="viewprofile.php?viewuser=<?php echo $name ?>"><?php echo $rows['owner']; ?></a></td>
<td width="10%"><?php echo "$num"; ?></td>
</tr>

<tr>
<td colspan="5" align="right">
<?php
      $num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE id >1"));
      echo ' $num_true /5 Families';?>
</td>
</tr>
</table>
<br><br>
<td>
<?php
      mysql_query("SELECT * FROM users WHERE famlevel=$famlevl")
      if($famlevel = 0) {
      $sql2="SELECT * from famreq WHERE famid='$famid' AND status='$Pending'";
      $result2=mysql_query($sql2);
      $num_true=mysql_num_rows($result2);
      echo "$num_true";}
?>
</td>
  <td align="center"><input type="submit" name="acceptreq" value="Accept"></td>
<tr>
  <td class="header" colspan="2" align="center">Create Family </td>
</tr>
<tr>
  <td><p><font color="blue"><b>Making a family will Cost $500,000,000,000.  You must be ranked Underboss + to make a Family.</b></font></p></td>
</tr>
<tr>
  <td width="92%" bgcolor="#3c3025" border="0"><center>Family Name:<br><input type="text" style="border:1px solid black;" name="familyname"><br><br><input type="submit" value="Create Family" name="createfamily"></center></td>
</tr>
<?php
      $num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE owner='$name'"));
      if($num_true == 1) {
?>
<tr>
  <td class="header" colspan="2" align="center">Pending Application</td>
</tr>
<?php
        include "includes/db_connect.php";
        $sql="SELECT * FROM famreq WHERE username='$username'";
        $result=mysql_query($sql);
        while($rows=mysql_fetch_array($result)) { // Start looping table row
?>
<tr>
  <td colspan="2" align="center">You have requested <b><?php echo $username; ?></b><br><br><input type="submit" value="Cancel Application" name="cancelapply"></td>
</tr>
<?php
          }
        }
?>
</table></form>

<br>

<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
<?php
    $num_true=mysql_num_rows(mysql_query("SELECT * FROM BG WHERE bg='$username' AND status='$Pending' AND family=''"));
    if($num_true >= 1){
?>
<tr>
</tr>
<?php
      $sql="SELECT * FROM BG WHERE bg='$username' AND family=''";
      $result=mysql_query($sql);
      while($rows=mysql_fetch_array($result)) { // Start looping table row
?>
<tr>
</tr>
<?php
        }
      }
?>
</table>
<br>
<?php
    if($famlevel >= 0) {
?>
<form method="post" action="">
<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
<?php
      $num_true=mysql_num_rows(mysql_query("SELECT * FROM BG WHERE bg='$username' AND status='$Pending'"));
      if($num_true >= 1) {
?>
<tr>
<td class="header" colspan="2" align="center">Bodyguard Invitation</td>
</tr>
<?php
        $sql="SELECT * FROM BG WHERE bg='$username'";
        $result=mysql_query($sql);
        while($rows=mysql_fetch_array($result)) { // Start looping table row
?>
<tr>
<td colspan="2" align="center">You have been invited to be a bodyguard!<br><input type="submit" value="Accept" name="acceptbg"></td>
</tr>
<?php
          }
        }
?>
</table>
<br>
<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
<tr>
<td class="header" colspan="2" align="center">Leave Family</td>
</tr>
<tr>
<td colspan="2" align="center"><font color="red"><b>Note: Leaving your Family will result in you losing 95% health</b></font><br><br><input type="submit" value="Leave Family" name="leave"></td>
</tr>
<?php
      if($famlevel >=7 && $fetch->slot <500) {
?>
<tr>
<td class="header" colspan="2" align="center">Upgrade Family Size</td>
</tr>
<tr>
<td align="center">
<?php
        if($fetch->slot ==50) {
          $next=75; $upgradecost=100000000;
          }
        if($fetch->slot ==75) {
          $next=125; $upgradecost=1250000000;
          } elseif($fetch->slot ==125) {
          $next=200; $upgradecost=1500000000;
          } elseif($fetch->slot ==200) {
          $next=300; $upgradecost=3000000000;
          } elseif($fetch->slot ==300) {
          $next=500; $upgradecost=5000000000;
          }
?>
Your Families current size is <b><?php echo $fetch->slot ; ?></b>, it will cost $<?php echo number_format($upgradecost); ?> to upgrade it to <?php echo $next ;?>.<br>
<input type="submit" name="upgrade" value="Upgrade">
</td>
</tr>
<?php
        }
?>
</table>
<?php
      }
?>
</form>
<?php
    if($userlevel >= 5) {
?>
<form method="post" action="">
<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
<tr>
<td class="header" colspan="2" align="center">Change Family Name</td>
</tr>
<tr>
<td width="90%" align="center">Family ID:<br><input style="border:1px solid black;" type="text" name="famid"><br></td>
</tr>
<tr>
<td align="center">New family Name:<br><input type="text" style="border:1px solid black;" name="newfamname"><br><br>
<input type="submit" value="Change" name="change">	  </td>
</tr>
</table>
</form>
<br><br>
<?php
      }
    if($userlevel >= 15) {
?>
<form method="post" action="">
<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
<tr>
<td class="header" colspan="2" align="center">Drop Family</td>
</tr>
<tr>
<td width="90%" align="center"><br><center><select name="famnamedrop">
<?php
      include "includes/db_connect.php";
      $sql="SELECT * FROM family ORDER by id";
      $result=mysql_query($sql);
      while($rows=mysql_fetch_array($result)) { // Start looping table row
?>
<option><?php echo $rows['name']; ?></option>
<?php
        }
?>
</select>
<br><br>
<input type="submit" value="Drop Family" name="dropfamily"></center>
</td>
</tr>
</table>
</form>
<?php
      }
?>
<br><br></td>
<TD width="150" valign="top">
<?php include("rightmenu.php");?>
</TD>
</TR>
</table>
</center>
</body>
</html>

  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

I'm sorry, I posted without readin the new reply's.  After updating my script to the one kickstart did (thanks, I really appreciate it!), I got this error, to which is completely new to me:

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/klrbal/public_html/Mafia-test/tempfam.php:2) in /home/klrbal/public_html/Mafia-test/tempfam.php on line 3

 

Here is the code:

<?php
session_start();

if(!(isset($_SESSION["real_name"]))) 
{
//echo "I'm not logged in";
header('Location: index.php');
} 
else 
{
echo "";
}
?>
<html>
<head>
<title>Mafia Syndicate BETA .::. Families</title>
<link REL="stylesheet" TYPE="text/css" HREF="main.css">
<script language=javascript src=Menus.js></script>
</head>

<body background="wallpaper.jpg">
<center>
<table border="0" cellspacing="0" cellpadding="0" align="center" width="95%" class="cat">
<TR>
<TD width="150" background="tdbg3.jpg" bgcolor="#222222" valign="top"><?php include("leftmenu.php");?></TD>
<td width="100%" valign="top"><br>
<?php
$fetch=mysql_fetch_object(mysql_query("SELECT * FROM crews WHERE name='$crew' LIMIT 1"));

////CREATE CREW/////
if($_POST['createfamily'] && $_POST['familyname']) 
{
$familyname == $_POST['familyname'];
if($rankpoints <= 140109) 
{
	echo "You must be Underboss before you can make a crew!";
} 
else 
{
	if($crewlevel==0) 
	{
		$finalcash = $cash - 500000000000 ;
		if($finalcash <0) 
		{
			echo "You do not have enough cash!";
		} 
		elseif($finalcash >=0) 
		{
			$num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE id >1"));
			if($num_true >= 5) 
			{
				echo "There are already 5 Crew Slots!";
			} 
			else 
			{
				$num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE name='$familyname'"));
				if($num_true >= 1) 
				{
					echo "There is already a Family with that name!";
				} 
				else 
				{
					function change($msg) 
					{
						$post = $msg;
						$post = str_replace("'", "`", $post);
						return $post;
					}
					$new=change($crewname);
					mysql_query("INSERT INTO `family` ( `id` , `owner` , `name` , `bank` , `quote` , `news` , `slot` ) VALUES ('', '$username', '$new', '0', 'No Quote!', 'You have no family news8)', '50')");
					mysql_query("UPDATE users SET famlevel='9' WHERE username='$username'");
					mysql_query("UPDATE users SET cash='$finalcash', family='$new'  WHERE username='$username'");
					mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Bought a Family called <b>$new</b>!', '$date', '$realip')");
					echo "You have created the Family <b>$new!</b>";
				}
			}
		}
	}
}
}

if($_POST['cancelapply']) 
{
mysql_query("DELETE FROM famreq WHERE username='$username'");
echo "You have cancelled your application!";
}


/////END OF CREATE CREW!!!/////

if(famlevel >= 2);
if($_POST['inviteuser'] && strip_tags($_POST['inviteusername'])) 
{
$sql2="SELECT * from famreq WHERE username='$username'";
$result2=mysql_query($sql2);
$num_true=mysql_num_rows($result2);
if($num_true >= 1) 
{
	echo "You have already pending Family request!";
} 
elseif($num_true <=1) 
{
	$crewnamejoin = $_POST['inviteusername'];
	$crewnamejoin = strip_tags($inviteusername);
	$sql="SELECT * FROM users WHERE username='$username'";
	$result=mysql_query($sql);
	if($_POST['acceptinvite']) 
	{
		$sql="SELECT * from famreq WHERE family='$famid'";
		$result=mysql_query($sql);
		mysql_query("INSERT INTO `famreq` ( `id` , `famid` , `username` , `status` , `f` ) VALUES ('', '$invitedusername', '$username', '$status', '$f' )");
		echo "You have requested $invitedusername to join your family!";
	}
}
}
if($_POST['leave'] && $famlevel >=2 && $famlevel <7)
{
if($famlevel <= 0) 
{
	echo "You are not in a Family!";
} 
else 
{
	if($famlevel >= 4) 
	{
		echo "You can not leave your family!";
		if($_POST['change'] && strip_tags($_POST['newfamname']) && strip_tags($_POST['famid']) && $userlevel >=10) 
		{
			$newcrewname = $_POST['newfamname'];
			$newcrewname = strip_tags($newfamname);
			$crewid = $_POST['famid'];
			$crewid = strip_tags($famid);
			$sql="SELECT * from family WHERE id='$famid'";
			$result=mysql_query($sql);
			while($rows=mysql_fetch_array($result)) 
			{ // Start looping table row
				$oname = $rows['name'];
			}
			$num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE name='$newfamname'"));
			if($num_true >= 1) 
			{
			echo "There is already a family with that name!";
			} 
			else 
			{
				function change($msg) 
				{
					$post = $msg;
					$post = str_replace("'", "`", $post);
					return $post;
				}
				$newfamname=change($newfamame);
				mysql_query("UPDATE users SET famname='$newfamname' WHERE famname='$oname'");
				mysql_query("UPDATE famreq SET famid='$newfamname' WHERE famid='$oname'");
				mysql_query("UPDATE forum_answer SET place='$newfamname' WHERE place='$oname'");
				mysql_query("UPDATE forum_question SET place='$newfamname' WHERE place='$oname'");
				mysql_query("UPDATE family_donations SET fam='$newfamname' WHERE famname='$oname'");
				mysql_query("UPDATE family SET famname='$newfamname' WHERE id='$crewid'");
				mysql_query("UPDATE BG SET crew='$newfamname' WHERE crew='$oname'");
				echo "You changed the family $oname to $newfamname!";
			}
		}
		if($_POST['dropfam'] && strip_tags($_POST['famnamedrop']) && $userlevel >=15) 
		{
			$crewnamedrop = $_POST['famnamedrop'];
			$crewnamedrop = strip_tags($famnamedrop);
			mysql_query("DELETE FROM crews WHERE name='$crewnamedrop'");
			mysql_query("UPDATE users SET crewlevel='0', crew='None' WHERE crew='$crewnamedrop'");
			mysql_query("DELETE FROM crewapply WHERE crew='$crewnamedrop'");
			mysql_query("DELETE FROM forum_answer WHERE place='$crewnamedrop'");
			mysql_query("DELETE FROM forum_question WHERE place='$crewnamedrop'");
			mysql_query("DELETE FROM crew_donations WHERE place='$crewnamedrop'");
			echo "You have droped <b>$crewnamedrop</b>!";
		}
		if($_POST['acceptbg']) 
		{
			mysql_query("UPDATE BG SET status='Accepted' WHERE bg='$username' AND status='Pending'");
			echo "You are now a bodyguard";
		}
		if($_POST['acceptbg2']) 
		{
			mysql_query("UPDATE BG SET status='Accepted' WHERE bg='$username' AND status='Pending'");
			echo "You are now a bodyguard!";
		}
		if($_POST['upgrade'] && $famlevel >=7 && $fetch->slot <500) 
		{
			if($fetch->slot ==75) 
			{
				$next=125; $upgradecost=10000000000;
			} 
			elseif($fetch->slot ==125) 
			{
				$next=200; $upgradecost=150000000000;
			} 
			elseif($fetch->slot ==200) 
			{
				$next=300; $upgradecost=20000000000;
			} 
			elseif($fetch->slot ==300) 
			{
				$next=500; $upgradecost=30000000000;
			}
			$newcash = $cash - $upgradecost;
			if($newcash <0) 
			{
				echo "You do not have enough cash to upgrade!";
			} 
			else 
			{
				mysql_query("UPDATE family SET slot='$next' WHERE name='$name' AND owner='$username'");
				mysql_query("UPDATE users SET cash=cash-'$upgradecost' WHERE username='$username' AND family='$famname'");
				echo "Your Family size is now <b>$next</b>!";
			}
		}
		?>
		<table border="1" class="sub2" align="center" cellspacing="0" cellpadding="1" bordercolor=black width=81%>
		<tr>
		<td align="center" colspan="5" class="header">Crews</td>
		</tr>
		<?php
		include "includes/db_connect.php";
		$sql="SELECT * FROM family ORDER by id ASC";
		$result=mysql_query($sql);
		while($rows=mysql_fetch_array($result)) 
		{ // Start looping table row
			$name=$rows['owner'];
			$famname=$rows['id'];
			$famname2=$rows['name'];
			$sql2="SELECT * from users WHERE family='$famname2'";
			$result2=mysql_query($sql2);
			$num=mysql_num_rows($result2);
			?>
			<tr>
			<td width="70%"><a href="viewcrewprofile.php?viewcrew=<?php echo $famname ?>"><?php echo $rows['name']; ?></a></td>
			<td width="20%"><a href="viewprofile.php?viewuser=<?php echo $name ?>"><?php echo $rows['owner']; ?></a></td>
			<td width="10%"><?php echo "$num"; ?></td>
			</tr>
			<?php
		}
		?>
		<tr>
		<td colspan="5" align="right">
		<?php
		$num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE id >1"));
		echo "$num_true";
		?>
		/5 Families
		</td>
		</tr>
		</table>
		<br><br>
		<td>
		<?php
		$sql2="SELECT * from famreq WHERE famid='$famid' AND status='Pending'";
		$result2=mysql_query($sql2);
		$num_true=mysql_num_rows($result2);
		echo "$num_true";
		?>
		</td>
		<td align="center"><input type="submit" name="acceptreq" value="Accept"></td>
		<tr>
		<td class="header" colspan="2" align="center">Create Crew </td>
		</tr>
		<tr>
		<td><p><font color="blue"><b>Making a family will Cost $500,000,000,000.  You must be ranked Underboss + to make a Family.</b></font></p></td>
		</tr>
		<tr>
		<td width="92%" bgcolor="#3c3025" border="0"><center>Crew Name:<br><input type="text" style="border:1px solid black;" name="familyname"><br><br><input type="submit" value="Create Family" name="createfamily"></center></td>
		</tr>
		<?php
		$num_true=mysql_num_rows(mysql_query("SELECT * FROM famreq WHERE username='$username'"));
		if($num_true == 1) 
		{
			?>
			<tr>
			<td class="header" colspan="2" align="center">Pending Application</td>
			</tr>
			<?php
			include "includes/db_connect.php";
			$sql="SELECT * FROM famreq WHERE username='$username'";
			$result=mysql_query($sql);
			while($rows=mysql_fetch_array($result)) 
			{ // Start looping table row
				?>
				<tr>
				<td colspan="2" align="center">You have requested <b><?php echo $username; ?></b><br><br><input type="submit" value="Cancel Application" name="cancelapply"></td>
				</tr>
				<?php
			}
		}
		?>
		</table></form>
		<?php
	}
	?>
	<br>

	<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
	<?php
	$num_true=mysql_num_rows(mysql_query("SELECT * FROM BG WHERE bg='$username' AND status='Pending' AND crew=''"));
	if($num_true >= 1)
	{
		?>
		<tr>
		</tr>
		<?php
		$sql="SELECT * FROM BG WHERE bg='$username' AND crew=''";
		$result=mysql_query($sql);
		while($rows=mysql_fetch_array($result)) 
		{ // Start looping table row
			?>
			<tr>
			</tr>
			<?php
		}
	}
	?>
	</table>
	<br>
	<?php
	if($famlevel >= 0) 
	{
		?>
		<form method="post" action="">
		<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
		<?php
		$num_true=mysql_num_rows(mysql_query("SELECT * FROM BG WHERE bg='$username' AND status='Pending'"));
		if($num_true >= 1) 
		{
			?>
			<tr>
			<td class="header" colspan="2" align="center">Bodyguard Invitation</td>
			</tr>
			<?php
			$sql="SELECT * FROM BG WHERE bg='$username'";
			$result=mysql_query($sql);
			while($rows=mysql_fetch_array($result)) 
			{ // Start looping table row
				?>
				<tr>
				<td colspan="2" align="center">You have been invited to be a bodyguard!<br><input type="submit" value="Accept" name="acceptbg"></td>
				</tr>
				<?php
			}
		}
		?>
		</table>
		<br>
		<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
		<tr>
		<td class="header" colspan="2" align="center">Leave Crew</td>
		</tr>
		<tr>
		<td colspan="2" align="center"><font color="red"><b>Note: Leaving crew can result in you losing up to 85% health</b></font><br><br><input type="submit" value="Leave Crew" name="leave"></td>
		</tr>
		<?php
		if($crewlevel >=7 && $fetch->slot <200) 
		{
			?>
			<tr>
			<td class="header" colspan="2" align="center">Upgrade Crew Size</td>
			</tr>
			<tr>
			<td align="center">
			<?php
			if($fetch->slot ==50) 
			{
			$next=75; $upgradecost=100000000;
			}
			if($fetch->slot ==75) 
			{
				$next=125; $upgradecost=1250000000;
			} 
			elseif($fetch->slot ==125) 
			{
				$next=200; $upgradecost=1500000000;
			} 
			elseif($fetch->slot ==200) 
			{
				$next=300; $upgradecost=3000000000;
			} 
			elseif($fetch->slot ==300) 
			{
				$next=500; $upgradecost=5000000000;
			}
			?>
			Your Families current size is <b><?php echo $fetch->slot ; ?></b>, it will cost $<?php echo number_format($upgradecost); ?> to upgrade it to <?php echo $next ;?>.<br>
			<input type="submit" name="upgrade" value="Upgrade">
			</td>
			</tr>
			<?php
		}
		?>
		</table>
		<?php
	}
	?>
	</form>
	<?php
	if($userlevel >= 5) 
	{
		?>
		<form method="post" action="">
		<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
		<tr>
		<td class="header" colspan="2" align="center">Change Family Name</td>
		</tr>
		<tr>
		<td width="90%" align="center">Family ID:<br><input style="border:1px solid black;" type="text" name="famid"><br></td>
		</tr>
		<tr>
		<td align="center">New family Name:<br><input type="text" style="border:1px solid black;" name="newfamname"><br><br>
		<input type="submit" value="Change" name="change">	  </td>
		</tr>
		</table>
		</form>
		<br><br>
		<?php
	}
	if($userlevel >= 15) 
	{
		?>
		<form method="post" action="">
		<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
		<tr>
		<td class="header" colspan="2" align="center">Drop Family</td>
		</tr>
		<tr>
		<td width="90%" align="center"><br><center><select name="famnamedrop">
		<?php
		include "includes/db_connect.php";
		$sql="SELECT * FROM family ORDER by id";
		$result=mysql_query($sql);
		while($rows=mysql_fetch_array($result)) 
		{ // Start looping table row
			?>
			<option><?php echo $rows['name']; ?></option>
			<?php
		}
		?>
		</select>
		<br><br>
		<input type="submit" value="Drop Family" name="dropfamily"></center>
		</td>
		</tr>
		</table>
		</form>
		<?php
	}
	?>
	<br><br></td>
	<TD width="150" valign="top">
	<?php include("rightmenu.php");?>
	</TD>
	</TR>
	</table>
	<?php
}
}
?>
</center>
</body>
</html>

The error's very basically saying you're trying to use "session_start()" after you've started outputting HTML/text. Is this code being included by another file?

 

not that I know of.  It started doing this when I used the new script kickstart made.  The other one still shows the same error

Hi

 

It is the blank line at the very start (before the <?php) That is sent to the browser and counts as output. Just remove it (just there from me pasting it into this board).

 

The other error is a missing ; on the end of a line (code you had editted for your version)

 

All the best

 

Keith

Hi

 

It is the blank line at the very start (before the <?php) That is sent to the browser and counts as output. Just remove it (just there from me pasting it into this board).

 

The other error is a missing ; on the end of a line (code you had editted for your version)

 

All the best

 

Keith

 

Alrighty, fixed the first one and the page loads with absolutely NOTHING on it :lol::wtf:  just a blank page with my left menu.

 

Went back to the old one and tried it and got this:

 

Parse error: syntax error, unexpected $end in /home/klrbal/public_html/Mafia-test/tempfam.php on line 523

 

been through ALL of it and can't find anything that's left open. :S

 

You need to start at the top of your code and run through the logic the whole way...

 

You have multiple unclosed if statements within the first 50 lines of code.

 

You also have

If (condition) {
  
} else {

} elseif(condition){

}

 

If's do not work that way... it should be

 

If(condition){

}else if(condition){

} else {

}

etc.

 

Once you get all that cleaned up, your parse errors should be fixed for the most part. But fixing one line at a time as suggested by 7 different people is never going to get this done for you :)

Alrighty, fixed the first one and the page loads with absolutely NOTHING on it :lol::wtf:  just a blank page with my left menu.

 

Do a "view source" and check if anything is returned.

 

With the apparent logic it would be quite easy for little to be displayed (it appears to expect be called by a form being submitted).

 

Parse error: syntax error, unexpected $end in /home/klrbal/public_html/Mafia-test/tempfam.php on line 523

 

What is tempfam.php? Neither the formatted version I posted nor the one you have played with are 523 lines long.

 

All the best

 

Keith

ok, I've gone to using the better written script. no more 500+ lines.  Now, i've got it to pull up stuff on the page, but I am getting MySQL errors ALL over the place.  Here they all are:

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/klrbal/public_html/Mafia-test/tempfam.php on line 268

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/klrbal/public_html/Mafia-test/tempfam.php on line 280

 

You are now a bodyguard

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/klrbal/public_html/Mafia-test/tempfam.php on line 229

 

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/klrbal/public_html/Mafia-test/tempfam.php on line 253

 

Here is my coding:

<?php
session_start();

if(!(isset($_SESSION["real_name"]))) 
{
//echo "I'm not logged in";
header('Location: index.php');
} 
else 
{
echo "";
}
?>
<html>
<head>
<title>Mafia Syndicate BETA .::. Families</title>
<link REL="stylesheet" TYPE="text/css" HREF="main.css">
<script language=javascript src=Menus.js></script>
</head>

<body background="wallpaper.jpg">
<center>
<table border="0" cellspacing="0" cellpadding="0" align="center" width="95%" class="cat">
<TR>
<TD width="150" background="tdbg3.jpg" bgcolor="#222222" valign="top"><?php include("leftmenu.php");?></TD>
<td width="100%" valign="top"><br>
<?php
$fetch=mysql_fetch_object(mysql_query("SELECT * FROM family WHERE name='$family' LIMIT 1"));

////CREATE FAMILY/////
if($_POST['createfamily'] && $_POST['familyname']) 
{
$familyname == $_POST['familyname'];
if($rankpoints <= 140109) 
{
	echo "You must be Underboss before you can make a crew!";
} 
else 
{
	if($famlevel==0) 
	{
		$finalcash = $cash - 500000000000 ;
		if($finalcash <0) 
		{
			echo "You do not have enough cash!";
		} 
		elseif($finalcash >=0) 
		{
			$num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE id >1"));}
			if($num_true >= 5) 
			{
				echo "There are already 5 Family Slots!";
			} 
			else 
			{
				$num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE name='$familyname'"));}
				if($num_true >= 1) 
				{
					echo "There is already a Family with that name!";
				} 
				else 
				{
					function change($msg) 
					{
						$post = $msg;
						$post = str_replace("'", "`", $post);
						return $post;
					}
					$new=change($crewname);
					mysql_query("INSERT INTO `family` ( `id` , `owner` , `name` , `bank` , `quote` , `news` , `slot` ) VALUES ('', '$username', '$new', '0', 'No Quote!', 'You have no family news8)', '50')");
					mysql_query("UPDATE users SET famlevel='9' WHERE username='$username'");
					mysql_query("UPDATE users SET cash='$finalcash', family='$new'  WHERE username='$username'");
					mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Bought a Family called <b>$new</b>!', '$date', '$realip')");
					echo "You have created the Family <b>$new!</b>";
				}
			}
		}
	}

if($_POST['cancelapply']) 
{
mysql_query("DELETE FROM famreq WHERE username='$username'");
echo "You have cancelled your application!";
}


/////END OF CREATE CREW!!!/////

if(famlevel >= 2);
if($_POST['inviteuser'] && strip_tags($_POST['inviteusername'])) 
{
$sql2="SELECT * from famreq WHERE username='$username'";
$result2=mysql_query($sql2);
$num_true=mysql_num_rows($result2);}
if($num_true >= 1) 
{
	echo "You have already pending Family request!";
} 
elseif($num_true <=1) 
{
	$crewnamejoin = $_POST['inviteusername'];
	$crewnamejoin = strip_tags($inviteusername);
	$sql="SELECT * FROM users WHERE username='$username'";
	$result=mysql_query($sql);}
	if($_POST['acceptinvite']) 
	{
		$sql="SELECT * from famreq WHERE family='$famid'";
		$result=mysql_query($sql);
		mysql_query("INSERT INTO `famreq` ( `id` , `famid` , `username` , `status` , `f` ) VALUES ('', '$invitedusername', '$username', '$status', '$f' )");
		echo "You have requested $invitedusername to join your family!";
	}

if($_POST['leave'] && $famlevel >=2 && $famlevel <7)
{
if($famlevel <= 0) 
{
	echo "You are not in a Family!";
} 
else 
{
	if($famlevel >= 4) 
	{
		echo "You can not leave your family!";}
		if($_POST['change'] && strip_tags($_POST['newfamname']) && strip_tags($_POST['famid']) && $userlevel >=10) 
		{
			$newcrewname = $_POST['newfamname'];
			$newcrewname = strip_tags($newfamname);
			$crewid = $_POST['famid'];
			$crewid = strip_tags($famid);
			$sql="SELECT * from family WHERE id='$famid'";
			$result=mysql_query($sql);}
			while($rows=mysql_fetch_array($result)) 
			{ // Start looping table row
				$oname = $rows['name'];
			}
			$num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE name='$newfamname'"));
			if($num_true >= 1) 
			{
			echo "There is already a family with that name!";
			} 
			else 
			{
				function change($msg) 
				{
					$post = $msg;
					$post = str_replace("'", "`", $post);
					return $post;
				}
				$newfamname=change($newfamame);
				mysql_query("UPDATE users SET famname='$newfamname' WHERE famname='$oname'");
				mysql_query("UPDATE famreq SET famid='$newfamname' WHERE famid='$oname'");
				mysql_query("UPDATE forum_answer SET place='$newfamname' WHERE place='$oname'");
				mysql_query("UPDATE forum_question SET place='$newfamname' WHERE place='$oname'");
				mysql_query("UPDATE family_donations SET fam='$newfamname' WHERE famname='$oname'");
				mysql_query("UPDATE family SET famname='$newfamname' WHERE id='$crewid'");
				mysql_query("UPDATE BG SET crew='$newfamname' WHERE crew='$oname'");
				echo "You changed the family $oname to $newfamname!";
			}
		}
	}
		if($_POST['dropfam'] && strip_tags($_POST['famnamedrop']) && $userlevel >=15) 
		{
			$crewnamedrop = $_POST['famnamedrop'];
			$crewnamedrop = strip_tags($famnamedrop);
			mysql_query("DELETE FROM crews WHERE name='$crewnamedrop'");
			mysql_query("UPDATE users SET crewlevel='0', crew='None' WHERE crew='$crewnamedrop'");
			mysql_query("DELETE FROM crewapply WHERE crew='$crewnamedrop'");
			mysql_query("DELETE FROM forum_answer WHERE place='$crewnamedrop'");
			mysql_query("DELETE FROM forum_question WHERE place='$crewnamedrop'");
			mysql_query("DELETE FROM crew_donations WHERE place='$crewnamedrop'");
			echo "You have droped <b>$crewnamedrop</b>!";
		}
		if($_POST['acceptbg']) 
		{
			mysql_query("UPDATE BG SET status='Accepted' WHERE bg='$username' AND status='Pending'");
			echo "You are now a bodyguard";
		}
		if($_POST['acceptbg2']) 
		{
			mysql_query("UPDATE BG SET status='Accepted' WHERE bg='$username' AND status='Pending'");
			echo "You are now a bodyguard!";
		}
		if($_POST['upgrade'] && $famlevel >=7 && $fetch->slot <500) 
		{
			if($fetch->slot ==75) 
			{
				$next=125; $upgradecost=10000000000;
			} 
			elseif($fetch->slot ==125) 
			{
				$next=200; $upgradecost=150000000000;
			} 
			elseif($fetch->slot ==200) 
			{
				$next=300; $upgradecost=20000000000;
			} 
			elseif($fetch->slot ==300) 
			{
				$next=500; $upgradecost=30000000000;
			}
			$newcash = $cash - $upgradecost;
			if($newcash <0) 
			{
				echo "You do not have enough cash to upgrade!";
			} 
			else 
			{
				mysql_query("UPDATE family SET slot='$next' WHERE name='$name' AND owner='$username'");
				mysql_query("UPDATE users SET cash=cash-'$upgradecost' WHERE username='$username' AND family='$famname'");
				echo "Your Family size is now <b>$next</b>!";
			}
		}
		?>
		<table border="1" class="sub2" align="center" cellspacing="0" cellpadding="1" bordercolor=black width=81%>
		<tr>
		<td align="center" colspan="5" class="header">Families</td>
		</tr>
		<?php
		include "includes/db_connect.php";
		$sql="SELECT * FROM family ORDER by id ASC";
		$result=mysql_query($sql);
		while($rows=mysql_fetch_array($result)) 
		 // Start looping table row
			$name=$rows['owner'];
			$famname=$rows['id'];
			$famname2=$rows['name'];
			$sql2="SELECT * from users WHERE family='$famname'";
			$result2=mysql_query($sql2);
			$num=mysql_num_rows($result2);
			?>
			<tr>
			<td width="70%"><a href="viewcrewprofile.php?viewcrew=<?php echo $famname ?>">
			<?php echo $rows['name']; ?></a></td>
			<td width="20%"><a href="viewprofile.php?viewuser=<?php echo $name ?>"><?php echo $rows['owner']; ?></a></td>
			<td width="10%"><?php echo "$num"; ?></td>
			</tr>

		<tr>
		<td colspan="5" align="right">
		<?php
		$num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE id >1"));
		echo "$num_true";
		?>
		/5 Families
		</td>
		</tr>
		</table>
		<br><br>
		<td>
		<?php
		$sql2="SELECT * from famreq WHERE famid='$famid' AND status='Pending'";
		$result2=mysql_query($sql2);
		$num_true=mysql_num_rows($result2);
		echo "$num_true";
		?>
		</td>
		<td align="center"><input type="submit" name="acceptreq" value="Accept"></td>
		<tr>
		<td class="header" colspan="2" align="center">Create Family </td>
		</tr>
		<tr>
		<td><p><font color="blue"><b>Making a family will Cost $500,000,000,000.  You must be ranked Underboss + to make a Family.</b></font></p></td>
		</tr>
		<tr>
		<td width="92%" bgcolor="#3c3025" border="0"><center>Family Name:<br><input type="text" style="border:1px solid black;" name="familyname"><br><br><input type="submit" value="Create Family" name="createfamily"></center></td>
		</tr>
		<?php
		$num_true=mysql_num_rows(mysql_query("SELECT * FROM famreq WHERE status='$Pending'"));
		if($num_true == 1) 

			?>
			<tr>
			<td class="header" colspan="2" align="center">Pending Application</td>
			</tr>

			<?php
			include "includes/db_connect.php";
			$sql="SELECT * FROM famreq WHERE username='$username'";
			$result=mysql_query($sql);
			while($rows=mysql_fetch_array($result)) 
			 // Start looping table row
				?>
				<tr>
				<td colspan="2" align="center">You have requested <b><?php echo $username; ?></b><br><br><input type="submit" value="Cancel Application" name="cancelapply"></td>
				</tr>

		</table></form>

	<br>

	<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
	<?php
	$num_true=mysql_num_rows(mysql_query("SELECT * FROM BG WHERE bg='$username' AND status='Pending' AND crew=''"));
	if($num_true >= 1)

		?>
		<tr>
		</tr>
		<?php
		$sql="SELECT * FROM BG WHERE bg='$username' AND crew=''";
		$result=mysql_query($sql);
		while($rows=mysql_fetch_array($result)) 
		 // Start looping table row
			?>
			<tr>
			</tr>

	</table>
	<br>
	<?php
	if($famlevel >= 0) 

		?>
		<form method="post" action="">
		<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
		<?php
		$num_true=mysql_num_rows(mysql_query("SELECT * FROM BG WHERE bg='$username' AND status='Pending'"));
		if($num_true >= 1) 

			?>
			<tr>
			<td class="header" colspan="2" align="center">Bodyguard Invitation</td>
			</tr>
			<?php
			$sql="SELECT * FROM BG WHERE bg='$username'";
			$result=mysql_query($sql);
			while($rows=mysql_fetch_array($result)) 
			 // Start looping table row
				?>
				<tr>
				<td colspan="2" align="center">You have been invited to be a bodyguard!<br><input type="submit" value="Accept" name="acceptbg"></td>
				</tr>

		</table>
		<br>
		<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
		<tr>
		<td class="header" colspan="2" align="center">Leave Family</td>
		</tr>
		<tr>
		<td colspan="2" align="center"><font color="red"><b>Note: Leaving Family will result in you losing 95% health</b></font><br><br><input type="submit" value="Leave Crew" name="leave"></td>
		</tr>
		<?php
		if($famlevel >=7 && $fetch->slot <200) 

			?>
			<tr>
			<td class="header" colspan="2" align="center">Upgrade Family Size</td>
			</tr>
			<tr>
			<td align="center">
			<?php
			if($fetch->slot ==50) 
			{
			$next=75; $upgradecost=100000000;
			}
			if($fetch->slot ==75) 
			{
				$next=125; $upgradecost=1250000000;
			} 
			elseif($fetch->slot ==125) 
			{
				$next=200; $upgradecost=1500000000;
			} 
			elseif($fetch->slot ==200) 
			{
				$next=300; $upgradecost=3000000000;
			} 
			elseif($fetch->slot ==300) 
			{
				$next=500; $upgradecost=5000000000;
			}
			?>
			Your Families current size is <b><?php echo $fetch->slot ; ?></b>, it will cost $<?php echo number_format($upgradecost); ?> to upgrade it to <?php echo $next ;?>.<br>
			<input type="submit" name="upgrade" value="Upgrade">
			</td>
			</tr>

		</table>

	</form>
	<?php
	if($userlevel >= 5) 

		?>
		<form method="post" action="">
		<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
		<tr>
		<td class="header" colspan="2" align="center">Change Family Name</td>
		</tr>
		<tr>
		<td width="90%" align="center">Family ID:<br><input style="border:1px solid black;" type="text" name="famid"><br></td>
		</tr>
		<tr>
		<td align="center">New family Name:<br><input type="text" style="border:1px solid black;" name="newfamname"><br><br>
		<input type="submit" value="Change" name="change">	  </td>
		</tr>
		</table>
		</form>
		<br><br>
		<?php

	if($userlevel >= 15) 

		?>
		<form method="post" action="">
		<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
		<tr>
		<td class="header" colspan="2" align="center">Drop Family</td>
		</tr>
		<tr>
		<td width="90%" align="center"><br><center><select name="famnamedrop">
		<?php
		include "includes/db_connect.php";
		$sql="SELECT * FROM family ORDER by id";
		$result=mysql_query($sql);
		while($rows=mysql_fetch_array($result)) 
		 // Start looping table row
			?>
			<option><?php echo $rows['name']; ?></option>
			<?php

		?>
		</select>
		<br><br>
		<input type="submit" value="Drop Family" name="dropfamily"></center>
		</td>
		</tr>
		</table>
		</form>

	<br><br></td>
	<TD width="150" valign="top">
	<?php include("rightmenu.php");?>
	</TD>
	</TR>
	</table>

</center>
</body>
</html>

Ok, down to 1 error and I think this is keeping the page from running for the most part.  Here is the error:

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/klrbal/public_html/Mafia-test/tempfam.php on line 282

 

Here is the code:

<?php
session_start();
include "includes/db_connect.php";
if(!(isset($_SESSION["real_name"]))) 
{
//echo "I'm not logged in";
header('Location: index.php');
} 
else 
{
echo "";
}
?>
<html>
<head>
<title>Mafia Syndicate BETA .::. Families</title>
<link REL="stylesheet" TYPE="text/css" HREF="main.css">
<script language=javascript src=Menus.js></script>
</head>

<body background="wallpaper.jpg">
<center>
<table border="0" cellspacing="0" cellpadding="0" align="center" width="95%" class="cat">
<TR>
<TD width="150" background="tdbg3.jpg" bgcolor="#222222" valign="top"><?php include("leftmenu.php");?></TD>
<td width="100%" valign="top"><br>
<?php
$fetch=mysql_fetch_object(mysql_query("SELECT * FROM family WHERE name='$family' LIMIT 1"));
$fetch=mysql_fetch_object(mysql_query("SELECT * FROM users WHERE famlevel='$famlevel' "));
////CREATE FAMILY/////
if($famlevel ==0 )
if($_POST['createfamily'] && $_POST['familyname']) 
{
$familyname == $_POST['familyname'];
if($rankpoints <= 140109) 
{
	echo "You must be Underboss before you can make a crew!";
} 
else 
{
	if($famlevel==0) 
	{
		$finalcash = $cash - 500000000000 ;
		if($finalcash <0) 
		{
			echo "You do not have enough cash!";
		} 
		elseif($finalcash >=0) 
		{
			$num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE id >1"));}
			if($num_true >= 5) 
			{
				echo "There are already 5 Family Slots!";
			} 
			else 
			{
				$num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE name='$familyname'"));}
				if($num_true >= 1) 
				{
					echo "There is already a Family with that name!";
				} 
				else 
				{
					function change($msg) 
					{
						$post = $msg;
						$post = str_replace("'", "`", $post);
						return $post;
					}
					$new=change($crewname);
					mysql_query("INSERT INTO `family` ( `id` , `owner` , `name` , `bank` , `quote` , `news` , `slot` ) VALUES ('', '$username', '$new', '0', 'No Quote!', 'You have no family news8)', '50')");
					mysql_query("UPDATE users SET famlevel='9' WHERE username='$username'");
					mysql_query("UPDATE users SET cash='$finalcash', family='$new'  WHERE username='$username'");
					mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Bought a Family called <b>$new</b>!', '$date', '$realip')");
					echo "You have created the Family <b>$new</b>";
				}
			}
		}
	}

if($_POST['cancelapply']) 
{
mysql_query("DELETE FROM famreq WHERE username='$username'");
echo "You have cancelled your application!";
}


/////END OF CREATE CREW!!!/////

if(famlevel >= 2);
if($_POST['inviteuser'] && strip_tags($_POST['inviteusername'])) 
{
$sql2="SELECT * from famreq WHERE username='$username'";
$result2=mysql_query($sql2);
$num_true=mysql_num_rows($result2);}
if($num_true >= 1) 
{
	echo "You have already pending Family request!";
} 
elseif($num_true <=1) 
{
	$crewnamejoin = $_POST['inviteusername'];
	$crewnamejoin = strip_tags($inviteusername);
	$sql="SELECT * FROM users WHERE username='$username'";
	$result=mysql_query($sql);}
	if($_POST['acceptinvite']) 
	{
		$sql="SELECT * from famreq WHERE family='$famid'";
		$result=mysql_query($sql);
		mysql_query("INSERT INTO `famreq` ( `id` , `famid` , `username` , `status` , `f` ) VALUES ('', '$invitedusername', '$username', '$status', '$f' )");
		echo "You have requested $invitedusername to join your family!";
	}

if($_POST['leave'] && $famlevel >=2 && $famlevel <7)
{
if($famlevel <= 0) 
{
	echo "You are not in a Family!";
} 
else 
{
	if($famlevel >= 4) 
	{
		echo "You can not leave your family!";}
		if($_POST['change'] && strip_tags($_POST['newfamname']) && strip_tags($_POST['famid']) && $userlevel >=10) 
		{
			$newcrewname = $_POST['newfamname'];
			$newcrewname = strip_tags($newfamname);
			$crewid = $_POST['famid'];
			$crewid = strip_tags($famid);
			$sql="SELECT * from family WHERE id='$famid'";
			$result=mysql_query($sql);}
			while($rows=mysql_fetch_array($result)) 
			{ // Start looping table row
				$oname = $rows['name'];
			}
			$num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE name='$newfamname'"));
			if($num_true >= 1) 
			{
			echo "There is already a family with that name!";
			} 
			else 
			{
				function change($msg) 
				{
					$post = $msg;
					$post = str_replace("'", "`", $post);
					return $post;
				}
				$newfamname=change($newfamame);
				mysql_query("UPDATE users SET famname='$newfamname' WHERE famname='$oname'");
				mysql_query("UPDATE famreq SET famid='$newfamname' WHERE famid='$oname'");
				mysql_query("UPDATE forum_answer SET place='$newfamname' WHERE place='$oname'");
				mysql_query("UPDATE forum_question SET place='$newfamname' WHERE place='$oname'");
				mysql_query("UPDATE family_donations SET fam='$newfamname' WHERE famname='$oname'");
				mysql_query("UPDATE family SET famname='$newfamname' WHERE id='$crewid'");
				mysql_query("UPDATE BG SET crew='$newfamname' WHERE crew='$oname'");
				echo "You changed the family $oname to $newfamname!";
			}
		}
	}
		if($_POST['dropfam'] && strip_tags($_POST['famnamedrop']) && $userlevel >=15) 
		{
			$crewnamedrop = $_POST['famnamedrop'];
			$crewnamedrop = strip_tags($famnamedrop);
			mysql_query("DELETE FROM crews WHERE name='$crewnamedrop'");
			mysql_query("UPDATE users SET crewlevel='0', crew='None' WHERE crew='$crewnamedrop'");
			mysql_query("DELETE FROM crewapply WHERE crew='$crewnamedrop'");
			mysql_query("DELETE FROM forum_answer WHERE place='$crewnamedrop'");
			mysql_query("DELETE FROM forum_question WHERE place='$crewnamedrop'");
			mysql_query("DELETE FROM crew_donations WHERE place='$crewnamedrop'");
			echo "You have droped <b>$crewnamedrop</b>!";
		}
		if($_POST['acceptbg']) 
		{
			mysql_query("UPDATE BG SET status='Accepted' WHERE bg='$username' AND status='Pending'");
			echo "You are now a bodyguard";
		}
		if($_POST['acceptbg2']) 
		{
			mysql_query("UPDATE BG SET status='Accepted' WHERE bg='$username' AND status='Pending'");
			echo "You are now a bodyguard!";
		}
		if($_POST['upgrade'] && $famlevel >=7 && $fetch->slot <500) 
		{
			if($fetch->slot ==75) 
			{
				$next=125; $upgradecost=10000000000;
			} 
			elseif($fetch->slot ==125) 
			{
				$next=200; $upgradecost=150000000000;
			} 
			elseif($fetch->slot ==200) 
			{
				$next=300; $upgradecost=20000000000;
			} 
			elseif($fetch->slot ==300) 
			{
				$next=500; $upgradecost=30000000000;
			}
			$newcash = $cash - $upgradecost;
			if($newcash <0) 
			{
				echo "You do not have enough cash to upgrade!";
			} 
			else 
			{
				mysql_query("UPDATE family SET slot='$next' WHERE name='$name' AND owner='$username'");
				mysql_query("UPDATE users SET cash=cash-'$upgradecost' WHERE username='$username' AND family='$famname'");
				echo "Your Family size is now <b>$next</b>!";
			}
		}
		?>
		<table border="1" class="sub2" align="center" cellspacing="0" cellpadding="1" bordercolor=black width=81%>
		<tr>
		<td align="center" colspan="5" class="header">Families</td>
		</tr>
		<?php
		include "includes/db_connect.php";
		$sql="SELECT * FROM family ORDER by id ASC";
		$result=mysql_query($sql);
		while($rows=mysql_fetch_array($result)) 
		 // Start looping table row
			$name=$rows['owner'];
			$famname=$rows['id'];
			$famname2=$rows['name'];
			$sql2="SELECT * from users WHERE famlevel='$famlevel'";
			$result2=mysql_query($sql2);
			$num=mysql_num_rows($result2);
			?>
			<tr>
			<td width="70%"><a href="viewcrewprofile.php?viewcrew=<?php echo $famname ?>">
			<?php echo $rows['name']; ?></a></td>
			<td width="20%"><a href="viewprofile.php?viewuser=<?php echo $name ?>"><?php echo $rows['owner']; ?></a></td>
			<td width="10%"><?php echo "$num"; ?></td>
			</tr>

		<tr>
		<td colspan="5" align="right">
		<?php
		$num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE id >1"));
		echo "$num_true";
		?>
		/5 Families
		</td>
		</tr>
		</table>
		<br><br>
		<td>
		<?php
		if($famlevel = 0){
		$sql2="SELECT * from famreq WHERE famid='$famid' AND status='Pending'";
		$result2=mysql_query($sql2);
		$num_true=mysql_num_rows($result2);
		echo "$num_true";}
		?>
		</td>
		<td align="center"><input type="submit" name="acceptreq" value="Accept"></td>
		<tr>
		<td class="header" colspan="2" align="center">Create Family </td>
		</tr>
		<tr>
		<td><p><font color="blue"><b>Making a family will Cost $500,000,000,000.  You must be ranked Underboss + to make a Family.</b></font></p></td>
		</tr>
		<tr>
		<td width="92%" bgcolor="#3c3025" border="0"><center>Family Name:<br><input type="text" style="border:1px solid black;" name="familyname"><br><br><input type="submit" value="Create Family" name="createfamily"></center></td>
		</tr>
		<?php
		$num_true=mysql_num_rows(mysql_query("SELECT * FROM users WHERE famlevel='$famlevel'"));
		if($num_true >= 1) 
		echo 'You are already in a Family!'; 
			?>
			<tr>
			<td class="header" colspan="2" align="center">Pending Application</td>
			</tr>

			<?php
			include "includes/db_connect.php";
			$sql="SELECT * FROM famreq WHERE username='$username'";
			$result=mysql_query($sql);
			while($rows=mysql_fetch_array($result)) 
			 // Start looping table row
				?>
				<tr>
				<td colspan="2" align="center">You have requested <b><?php echo $username; ?></b><br><br><input type="submit" value="Cancel Application" name="cancelapply"></td>
				</tr>

		</table></form>

	<br>

	<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
	<?php
	$num_true=mysql_num_rows(mysql_query("SELECT * FROM BG WHERE bg='$username' AND status='Pending' AND crew=''"));
	if($num_true >= 1)

		?>
		<tr>
		</tr>
		<?php
		$sql="SELECT * FROM BG WHERE bg='$username' AND crew=''";
		$result=mysql_query($sql);
		while($rows=mysql_fetch_array($result)) 
		 // Start looping table row
			?>
			<tr>
			</tr>

	</table>
	<br>
	<?php
	if($famlevel >= 0) 

		?>
		<form method="post" action="">
		<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
		<?php
		$num_true=mysql_num_rows(mysql_query("SELECT * FROM BG WHERE bg='$username' AND status='Pending'"));
		if($num_true >= 1) 

			?>
			<tr>
			<td class="header" colspan="2" align="center">Bodyguard Invitation</td>
			</tr>
			<?php
			$sql="SELECT * FROM BG WHERE bg='$username'";
			$result=mysql_query($sql);
			while($rows=mysql_fetch_array($result)) 
			 // Start looping table row
				?>
				<tr>
				<td colspan="2" align="center">You have been invited to be a bodyguard!<br><input type="submit" value="Accept" name="acceptbg"></td>
				</tr>

		</table>
		<br>
		<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
		<tr>
		<td class="header" colspan="2" align="center">Leave Family</td>
		</tr>
		<tr>
		<td colspan="2" align="center"><font color="red"><b>Note: Leaving Family will result in you losing 95% health</b></font><br><br><input type="submit" value="Leave Crew" name="leave"></td>
		</tr>
		<?php
		if($famlevel >=7 && $fetch->slot <200) 

			?>
			<tr>
			<td class="header" colspan="2" align="center">Upgrade Family Size</td>
			</tr>
			<tr>
			<td align="center">
			<?php
			if($fetch->slot ==50) 
			{
			$next=75; $upgradecost=100000000;
			}
			if($fetch->slot ==75) 
			{
				$next=125; $upgradecost=1250000000;
			} 
			elseif($fetch->slot ==125) 
			{
				$next=200; $upgradecost=1500000000;
			} 
			elseif($fetch->slot ==200) 
			{
				$next=300; $upgradecost=3000000000;
			} 
			elseif($fetch->slot ==300) 
			{
				$next=500; $upgradecost=5000000000;
			}
			?>
			Your Families current size is <b><?php echo $fetch->slot ; ?></b>, it will cost $<?php echo number_format($upgradecost); ?> to upgrade it to <?php echo $next ;?>.<br>
			<input type="submit" name="upgrade" value="Upgrade">
			</td>
			</tr>

		</table>

	</form>
	<?php
	if($userlevel >= 5) 

		?>
		<form method="post" action="">
		<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
		<tr>
		<td class="header" colspan="2" align="center">Change Family Name</td>
		</tr>
		<tr>
		<td width="90%" align="center">Family ID:<br><input style="border:1px solid black;" type="text" name="famid"><br></td>
		</tr>
		<tr>
		<td align="center">New family Name:<br><input type="text" style="border:1px solid black;" name="newfamname"><br><br>
		<input type="submit" value="Change" name="change">	  </td>
		</tr>
		</table>
		</form>
		<br><br>
		<?php

	if($userlevel >= 15) 

		?>
		<form method="post" action="">
		<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
		<tr>
		<td class="header" colspan="2" align="center">Drop Family</td>
		</tr>
		<tr>
		<td width="90%" align="center"><br><center><select name="famnamedrop">
		<?php
		include "includes/db_connect.php";
		$sql="SELECT * FROM family ORDER by id";
		$result=mysql_query($sql);
		while($rows=mysql_fetch_array($result)) 
		 // Start looping table row
			?>
			<option><?php echo $rows['name']; ?></option>
			<?php

		?>
		</select>
		<br><br>
		<input type="submit" value="Drop Family" name="dropfamily"></center>
		</td>
		</tr>
		</table>
		</form>

	<br><br></td>
	<TD width="150" valign="top">
	<?php include("rightmenu.php");?>
	</TD>
	</TR>
	</table>

</center>
</body>
</html>

Can you not just post the lines around where the error is occurring rather than every single line every post!

post lines a few before and a few after the line giving the error

 

Sure, if that's what you want.  Here are lines 278 - 290

 

	<?php
			include "includes/db_connect.php";
			$sql="SELECT * FROM famreq WHERE username='$username'";
			$result=mysql_query($sql);
			while($rows=mysql_fetch_array($result)) 
			 // Start looping table row
				?>
				<tr>
				<td colspan="2" align="center">You have requested <b><?php echo $username; ?></b><br><br><input type="submit" value="Cancel Application" name="cancelapply"></td>
				</tr>

		</table></form>

umm, sorry I don't understand..  and the script wasn't indented by me, that was done by someone else.

 

You have taken out loads of the indentation, moved things about without changing it when needed and also you have dropped various curly brackets (which will prevent the loops from doing anything useful).

 

All the best

 

Keith

umm, sorry I don't understand..  and the script wasn't indented by me, that was done by someone else.

 

You have taken out loads of the indentation, moved things about without changing it when needed and also you have dropped various curly brackets (which will prevent the loops from doing anything useful).

 

All the best

 

Keith

 

The only curly's I've removed are the ones that were just there for no reason.  But that being said, do curly's have to be in the same php section to be used right?

ok, I reloaded the code, and now I get nothing.  I've been working on it but still can't seem to get anything to pull up.  When I view source for the page, the only thing it goes through is my left menu.  Once it gets to the end of my left menu, that's it, it cuts out from there and it's blank.

 

Here is my code:

<?php
session_start();

if(!(isset($_SESSION["real_name"]))) 
{
//echo "I'm not logged in";
header('Location: index.php');
} 
else 
{
echo "";
}

include "includes/db_connect.php";
?>
<html>
<head>
<title>Mafia Syndicate BETA .::. Families</title>
<link REL="stylesheet" TYPE="text/css" HREF="main.css">
<script language=javascript src=Menus.js></script>
</head>



<body background="wallpaper.jpg">
<center>
<table border="0" cellspacing="0" cellpadding="0" align="center" width="95%" class="cat">
<TR>
<TD width="150" background="tdbg3.jpg" bgcolor="#222222" valign="top"><?php include("leftmenu.php");?></TD>
<td width="100%" valign="top"><br>
<?php
$fetch=mysql_fetch_object(mysql_query("SELECT * FROM family WHERE name='$name' LIMIT 1"));

////CREATE Family/////
if($_POST['createfamily'] && $_POST['familyname']) 
{
$familyname == $_POST['familyname'];
if($rankpoints <= 140109) 
{
	echo "You must be Underboss before you can make a Family!";
} 
else 
{
	if($famlevel==0) 
	{
		$finalcash = $cash - 500000000000 ;
		if($finalcash <0) 
		{
			echo "You do not have enough cash!";
		} 
		elseif($finalcash >=0) 
		{
			$num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE id >1"));
			if($num_true >= 5) 
			{
				echo "There are already 5 Crew Slots!";
			} 
			else 
			{
				$num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE name='$familyname'"));
				if($num_true >= 1) 
				{
					echo "There is already a Family with that name!";
				} 
				else 
				{
					function change($msg) 
					{
						$post = $msg;
						$post = str_replace("'", "`", $post);
						return $post;
					}
					$new=change($crewname);
					mysql_query("INSERT INTO `family` ( `id` , `owner` , `name` , `bank` , `quote` , `news` , `slot` ) VALUES ('', '$username', '$new', '0', 'No Quote!', 'You have no family news8)', '50')");
					mysql_query("UPDATE users SET famlevel='9' WHERE username='$username'");
					mysql_query("UPDATE users SET cash='$finalcash', family='$new'  WHERE username='$username'");
					mysql_query("INSERT INTO `logs` ( `id` , `who` , `action` , `date` , `ip` ) VALUES ('', '$username', 'Bought a Family called <b>$new</b>!', '$date', '$realip')");
					echo "You have created the Family <b>$new!</b>";
				}
			}
		}
	}
}
}

if($_POST['cancelapply']) 
{
mysql_query("DELETE FROM familyreq WHERE username='$username'");
echo "You have cancelled your application!";
}


/////END OF CREATE FAMILY!!!/////

if(famlevel >= 2);
if($_POST['inviteuser'] && strip_tags($_POST['inviteusername'])) 
{
$sql2="SELECT * from familyreq WHERE username='$username'";
$result2=mysql_query($sql2);
$num_true=mysql_num_rows($result2);
if($num_true >= 1) 
{
	echo "You have already pending Family request!";
} 
elseif($num_true <=1) 
{
	$crewnamejoin = $_POST['inviteusername'];
	$crewnamejoin = strip_tags($inviteusername);
	$sql="SELECT * FROM users WHERE username='$username'";
	$result=mysql_query($sql);
	if($_POST['acceptinvite']) 
	{
		$sql="SELECT * from familyreq WHERE family='$famid'";
		$result=mysql_query($sql);
		mysql_query("INSERT INTO `familyreq` ( `id` , `famid` , `username` , `status` , `f` ) VALUES ('', '$famname' , '$invitedusername', '$status', '$f' )");
		echo "You have requested $invitedusername to join your family!";
	}
}
}
if($_POST['leave'] && $famlevel >=2 && $famlevel <7)
{
if($famlevel <= 0) 
{
	echo "You are not in a Family!";
} 
else 
{
	if($famlevel >= 4) 
	{
		echo "You can not leave your family!";
		if($_POST['change'] && strip_tags($_POST['newfamname']) && strip_tags($_POST['famid']) && $userlevel >=10) 
		{
			$newcrewname = $_POST['newfamname'];
			$newcrewname = strip_tags($newfamname);
			$crewid = $_POST['famid'];
			$crewid = strip_tags($famid);
			$sql="SELECT * from family WHERE id='$famid'";
			$result=mysql_query($sql);
			while($rows=mysql_fetch_array($result)) 
			{ // Start looping table row
				$oname = $rows['name'];
			}
			$num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE name='$newfamname'"));
			if($num_true >= 1) 
			{
			echo "There is already a family with that name!";
			} 
			else 
			{
				function change($msg) 
				{
					$post = $msg;
					$post = str_replace("'", "`", $post);
					return $post;
				}
				$newfamname=change($newfamame);
				mysql_query("UPDATE users SET famname='$newfamname' WHERE famname='$oname'");
				mysql_query("UPDATE famreq SET famid='$newfamname' WHERE famid='$oname'");
				mysql_query("UPDATE forum_answer SET place='$newfamname' WHERE place='$oname'");
				mysql_query("UPDATE forum_question SET place='$newfamname' WHERE place='$oname'");
				mysql_query("UPDATE family_donations SET fam='$newfamname' WHERE famname='$oname'");
				mysql_query("UPDATE family SET famname='$newfamname' WHERE id='$crewid'");
				mysql_query("UPDATE BG SET crew='$newfamname' WHERE crew='$oname'");
				echo "You changed the family $oname to $newfamname!";
			}
		}
		if($_POST['dropfam'] && strip_tags($_POST['famnamedrop']) && $userlevel >=15) 
		{
			$crewnamedrop = $_POST['famnamedrop'];
			$crewnamedrop = strip_tags($famnamedrop);
			mysql_query("DELETE FROM crews WHERE name='$crewnamedrop'");
			mysql_query("UPDATE users SET crewlevel='0', crew='None' WHERE crew='$crewnamedrop'");
			mysql_query("DELETE FROM crewapply WHERE crew='$crewnamedrop'");
			mysql_query("DELETE FROM forum_answer WHERE place='$crewnamedrop'");
			mysql_query("DELETE FROM forum_question WHERE place='$crewnamedrop'");
			mysql_query("DELETE FROM crew_donations WHERE place='$crewnamedrop'");
			echo "You have droped <b>$crewnamedrop</b>!";
		}
		if($_POST['acceptbg']) 
		{
			mysql_query("UPDATE BG SET status='Accepted' WHERE bg='$username' AND status='Pending'");
			echo "You are now a bodyguard";
		}
		if($_POST['acceptbg2']) 
		{
			mysql_query("UPDATE BG SET status='Accepted' WHERE bg='$username' AND status='Pending'");
			echo "You are now a bodyguard!";
		}
		if($_POST['upgrade'] && $famlevel >=7 && $fetch->slot <500) 
		{
			if($fetch->slot ==75) 
			{
				$next=125; $upgradecost=10000000000;
			} 
			elseif($fetch->slot ==125) 
			{
				$next=200; $upgradecost=150000000000;
			} 
			elseif($fetch->slot ==200) 
			{
				$next=300; $upgradecost=20000000000;
			} 
			elseif($fetch->slot ==300) 
			{
				$next=500; $upgradecost=30000000000;
			}
			$newcash = $cash - $upgradecost;
			if($newcash <0) 
			{
				echo "You do not have enough cash to upgrade!";
			} 
			else 
			{
				mysql_query("UPDATE family SET slot='$next' WHERE name='$name' AND owner='$username'");
				mysql_query("UPDATE users SET cash=cash-'$upgradecost' WHERE username='$username' AND family='$famname'");
				echo "Your Family size is now <b>$next</b>!";
			}
		}
		?>
		<table border="1" class="sub2" align="center" cellspacing="0" cellpadding="1" bordercolor=black width=81%>
		<tr>
		<td align="center" colspan="5" class="header">Crews</td>
		</tr>
		<?php
		include "includes/db_connect.php";
		$sql="SELECT * FROM family ORDER by id ASC";
		$result=mysql_query($sql);
		while($rows=mysql_fetch_array($result)) 
		{ // Start looping table row
			$name=$rows['owner'];
			$famname=$rows['id'];
			$famname2=$rows['name'];
			$sql2="SELECT * from users WHERE family='$famname2'";
			$result2=mysql_query($sql2);
			$num=mysql_num_rows($result2);
			?>
			<tr>
			<td width="70%"><a href="viewcrewprofile.php?viewcrew=<?php echo $famname ?>"><?php echo $rows['name']; ?></a></td>
			<td width="20%"><a href="viewprofile.php?viewuser=<?php echo $name ?>"><?php echo $rows['owner']; ?></a></td>
			<td width="10%"><?php echo "$num"; ?></td>
			</tr>
			<?php
		}
		?>
		<tr>
		<td colspan="5" align="right">
		<?php
		$num_true=mysql_num_rows(mysql_query("SELECT * FROM family WHERE id >1"));
		echo "$num_true";
		?>
		/5 Families
		</td>
		</tr>
		</table>
		<br><br>
		<td>
		<?php
		$sql2="SELECT * from familyreq WHERE famid='$famid' AND status='Pending'";
		$result2=mysql_query($sql2);
		$num_true=mysql_num_rows($result2);
		echo "$num_true";
		?>
		</td>
		<td align="center"><input type="submit" name="acceptreq" value="Accept"></td>
		<tr>
		<td class="header" colspan="2" align="center">Create Crew </td>
		</tr>
		<tr>
		<td><p><font color="blue"><b>Making a family will Cost $500,000,000,000.  You must be ranked Underboss + to make a Family.</b></font></p></td>
		</tr>
		<tr>
		<td width="92%" bgcolor="#3c3025" border="0"><center>Crew Name:<br><input type="text" style="border:1px solid black;" name="familyname"><br><br><input type="submit" value="Create Family" name="createfamily"></center></td>
		</tr>
		<?php
		$num_true=mysql_num_rows(mysql_query("SELECT * FROM familyreq WHERE username='$username'"));
		if($num_true == 1) 
		{
			?>
			<tr>
			<td class="header" colspan="2" align="center">Pending Application</td>
			</tr>
			<?php
			include "includes/db_connect.php";
			$sql="SELECT * FROM familyreq WHERE username='$username'";
			$result=mysql_query($sql);
			while($rows=mysql_fetch_array($result)) 
			{ // Start looping table row
				?>
				<tr>
				<td colspan="2" align="center">You have requested <b><?php echo $username; ?></b><br><br><input type="submit" value="Cancel Application" name="cancelapply"></td>
				</tr>
				<?php
			}
		}
		?>
		</table></form>
		<?php
	}
	?>
	<br>

	<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
	<?php
	$num_true=mysql_num_rows(mysql_query("SELECT * FROM BG WHERE bg='$username' AND status='Pending' AND crew=''"));
	if($num_true >= 1)
	{
		?>
		<tr>
		</tr>
		<?php
		$sql="SELECT * FROM BG WHERE bg='$username' AND crew=''";
		$result=mysql_query($sql);
		while($rows=mysql_fetch_array($result)) 
		{ // Start looping table row
			?>
			<tr>
			</tr>
			<?php
		}
	}
	?>
	</table>
	<br>
	<?php
	if($famlevel >= 0) 
	{
		?>
		<form method="post" action="">
		<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
		<?php
		$num_true=mysql_num_rows(mysql_query("SELECT * FROM BG WHERE bg='$username' AND status='Pending'"));
		if($num_true >= 1) 
		{
			?>
			<tr>
			<td class="header" colspan="2" align="center">Bodyguard Invitation</td>
			</tr>
			<?php
			$sql="SELECT * FROM BG WHERE bg='$username'";
			$result=mysql_query($sql);
			while($rows=mysql_fetch_array($result)) 
			{ // Start looping table row
				?>
				<tr>
				<td colspan="2" align="center">You have been invited to be a bodyguard!<br><input type="submit" value="Accept" name="acceptbg"></td>
				</tr>
				<?php
			}
		}
		?>
		</table>
		<br>
		<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
		<tr>
		<td class="header" colspan="2" align="center">Leave Family</td>
		</tr>
		<tr>
		<td colspan="2" align="center"><font color="red"><b>Note: Leaving Family will result in you losing 95% health</b></font><br><br><input type="submit" value="Leave Family" name="leave"></td>
		</tr>
		<?php
		if($famlevel >=7 && $fetch->slot <500) 
		{
			?>
			<tr>
			<td class="header" colspan="2" align="center">Upgrade Family Size</td>
			</tr>
			<tr>
			<td align="center">
			<?php
			if($fetch->slot ==50) 
			{
			$next=75; $upgradecost=100000000;
			}
			if($fetch->slot ==75) 
			{
				$next=125; $upgradecost=1250000000;
			} 
			elseif($fetch->slot ==125) 
			{
				$next=200; $upgradecost=1500000000;
			} 
			elseif($fetch->slot ==200) 
			{
				$next=300; $upgradecost=3000000000;
			} 
			elseif($fetch->slot ==300) 
			{
				$next=500; $upgradecost=5000000000;
			}
			?>
			Your Family's current size is <b><?php echo $fetch->slot ; ?></b>, it will cost $<?php echo number_format($upgradecost); ?> to upgrade it to <?php echo $next ;?>.<br>
			<input type="submit" name="upgrade" value="Upgrade">
			</td>
			</tr>
			<?php
		}
		?>
		</table>
		<?php
	}
	?>
	</form>
	<?php
	if($userlevel >= 5) 
	{
		?>
		<form method="post" action="">
		<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
		<tr>
		<td class="header" colspan="2" align="center">Change Family Name</td>
		</tr>
		<tr>
		<td width="90%" align="center">Family ID:<br><input style="border:1px solid black;" type="text" name="famid"><br></td>
		</tr>
		<tr>
		<td align="center">New family Name:<br><input type="text" style="border:1px solid black;" name="newfamname"><br><br>
		<input type="submit" value="Change" name="change">	  </td>
		</tr>
		</table>
		</form>
		<br><br>
		<?php
	}
	if($userlevel >= 15) 
	{
		?>
		<form method="post" action="">
		<table border="1" cellspacing="0" cellpadding="2" bordercolor="black" align="center" width="30%" class="sub2">
		<tr>
		<td class="header" colspan="2" align="center">Drop Family</td>
		</tr>
		<tr>
		<td width="90%" align="center"><br><center><select name="famnamedrop">
		<?php
		include "includes/db_connect.php";
		$sql="SELECT * FROM family ORDER by id";
		$result=mysql_query($sql);
		while($rows=mysql_fetch_array($result)) 
		{ // Start looping table row
			?>
			<option><?php echo $rows['name']; ?></option>
			<?php
		}
		?>
		</select>
		<br><br>
		<input type="submit" value="Drop Family" name="dropfamily"></center>
		</td>
		</tr>
		</table>
		</form>
		<?php
	}
	?>
	<br><br></td>
	<TD width="150" valign="top">
	<?php include("rightmenu.php");?>
	</TD>
	</TR>
	</table>
	<?php
}
}
?>
</center>
</body>
</html>

 

Can you see anything that would keep it from loading?

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.