Jump to content

Odd error


Pi_Mastuh

Recommended Posts

I'm getting Parse error: parse error, unexpected $ in /homepages/20/d175171605/htdocs/index.php on line 190 but there's no $ on line 190. What's wrong? ???

 

<?php 
  if(isset($_COOKIE['NetPetzpreuserID']) && isset($_COOKIE['NetPetzpreuserName'])){

session_start();

   session_register('preuserName');
   session_register('preuserID');
   session_register('cimage');
   session_register('preuserAge');
   session_register('userstatus');
   
      $_SESSION['preuserID'] = $_COOKIE['NetPetzpreuserID'];
    $_SESSION['preuserName'] = $_COOKIE['NetPetzpreuserName'];

   $session=session_id();

   header("Location: ../reg/home.php");
  }
   else
   { 
?>
<?
session_start();
$session=session_id( );
include ("secure/config.php"); //WHEN YOU PUT THIS ON THE PAGES ADD A secure/ BEFORE CONFIG.PHP!
?>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<META NAME="Description" CONTENT="Net-Petz is the newest virtual pet site on the internet. It has fun games, lots of cool petz to adopt, and tons of awesome items! It's completely free!">
<META NAME="Keywords" CONTENT="petz, net, virtual, pets, pet, fun, games, game, ">
</head>
<body>

<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1155" id="AutoNumber1" height="802">
  <tr>
    <td width="1483" height="138" valign="top" align="right" <?
$rand = rand (1,10);
	if ($rand == 1)
		{
			echo "background=SB1_anubis.png";
		}
	elseif ($rand == 2)
		{
			echo "background=SB1_bromaro.png";
		}
	elseif ($rand == 3)
		{
			echo "background=SB1_fang.png";
		}
	elseif ($rand == 4)
		{
			echo "background=SB1_kitachia.png";
		}	
	elseif ($rand == 5)
		{
			echo "background=SB1_coarattla.png";
		}	
	elseif ($rand == 6)
		{
			echo "background=SB1_dragonous.png";
		}	
	elseif ($rand == 7)
		{
			echo "background=SB1_fizz.png";
		}	
	elseif ($rand == 
		{
			echo "background=SB1_woofosa.png";
		}
	elseif ($rand == 9)
		{
			echo "background=SB1_worfoli.png";
		}	
	elseif ($rand == 10)
		{
			echo "background=SB1_lionaya.png";
		}	
?> colspan="2">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3" height="113">
      <tr>
        <td width="15%" height="104" colspan="3" rowspan="3"> </td>
        <td width="31%" height="40"> </td>
        <td width="54%" height="104" rowspan="3"> </td>
      </tr>
      <tr>
        <td width="31%" height="23">
        <p align="center"><b>
        <font color="#FFFFFF" face="Arial" style="font-size: 11pt"><? if ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/lookup.php?Name=$preuserName><font color=#FFFFFF>$preuserName</a>"; } else { print "Guest"; } ?> - 
        <? if ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/bank.php><font color=#FFFFFF>$points NPz</a>"; } else { print "0 NPz"; } ?> - <? if ($preuserID != 0 AND $activePetID == 0) { print "No Active Pet"; } elseif ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/petDetails2.php?monopetID=$activePetID><font color=#FFFFFF>$activePetName</a> is Active"; } else { print "No Active Pet"; } ?></font></b></td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td width="325" height="657" valign="top" align="right" background="SB3.png">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="103%" id="AutoNumber4" height="42">
      <tr>
        <td width="7%" height="27" align="center"> </td>
        <td width="51%" height="27" align="center" valign="top"> 
        </td>
        <td width="92%" height="27"> </td>
      </tr>
      <tr>
        <td width="7%" height="536" align="center"> </td>
        <td width="51%" height="536" align="center" valign="top">
<font color="#FFFFFF" face="Arial"> <font color="#FFFFFF" face="Arial"><b>.:Main:.<br>
        </b> <? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/home.php><font color=#FFFFFF>Home</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com><font color=#FFFFFF>Home</a>"; } ?><br></font>
        <a href="http://www.net-petz.com/reg/mypets.php"><font color="#FFFFFF">My Petz</font></a><br>
        <a href="http://www.net-petz.com/reg/myitems.php"><font color="#FFFFFF">Inventory</font></a><br>
        <? if ($preuserID != 0){ echo "<a href=http://www.net-petz.com/reg/logout.php><font color=#FFFFFF><- Logout</font></a><br>"; } else { echo "<a href=http://www.net-petz.com/login.php><font color=#FFFFFF>Login -></font></a><br>"; } ?><br>
        <b>.:Explore:.</b><br>
        <a href="http://www.net-petz.com/reg/netlandia.php">
        <font color="#FFFFFF">Netlandia</font></a><br>
        <a href="http://www.net-petz.com/reg/city.php"><font color="#FFFFFF">Net-City</font></a><br><br>
        <b>.:Interact:.</b><br>
        <a href="http://www.net-petz.com/reg/messageboard.php">
        <font color="#FFFFFF">Net-Boards</font></a><br>
        <a href="http://www.net-petz.com/reg/inbox.php"><font color="#FFFFFF">Net-Mail</font></a><br>
        <a href="http://www.net-petz.com/reg/lookups.php"><font color="#FFFFFF">Lookups</font></a><br>
        <a href="http://www.net-petz.com/reg/ushops.php"><font color="#FFFFFF">User Shops</font></a><br><br>
        <b>.:Fun:.</b><br>
        <a href="http://www.net-petz.com/reg/games.php"><font color="#FFFFFF">Game Room</font></a><br>
        <a href="http://www.net-petz.com/reg/stuff.php"><font color="#FFFFFF">Fun Stuff</font></a><br><br>
        <b>.:Options:.</b><br>
        <a href="http://www.net-petz.com/reg/userInfo.php">
        <font color="#FFFFFF">User Options</font></a><br>
        <a href="http://www.net-petz.com/reg/luedit.php"><font color="#FFFFFF">Lookup Options</font></a><br>
        <a href="http://www.net-petz.com/reg/boardpreff.php">
        <font color="#FFFFFF">Board Options</font></a><br><br>
        <b>.:More:.</b><br>
<? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/help.php><font color=#FFFFFF>About Us</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/help.php><font color=#FFFFFF>About Us</a>"; } ?><br>
<? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/contact.php><font color=#FFFFFF>Contact Us</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/contact.php><font color=#FFFFFF>Contact Us</a>"; } ?></td>
        <td width="92%" height="536"> </td>
      </tr>
    </table>
    </td>
    <td width="1213" height="1002" valign="top" align="center" rowspan="2">
<? //PAGE CONTENT ?>
<table border="4" cellspacing="1" width="67%" id="AutoNumber3" bordercolorlight="#000099" bordercolordark="#000099">
        <tr>
          <td width="100%" bordercolorlight="#000099" bordercolordark="#000099">
          <img border="0" src="Welcome%20logo.gif" width="618" height="44"></td>
        </tr>
      </table>
      <p>Net-Petz is the newest virtual pet site on the internet. It's filled 
      with cool petz, fun games, exciting places, and much more. It's free to 
      sign up so what are you waiting for?
      <a style="text-decoration: none" dynamicanimation="fpAnimformatRolloverFP1" fprolloverstyle="color: #FF0000; text-decoration: overline underline; font-weight: bold" onMouseOver="rollIn(this)" onMouseOut="rollOut(this)" language="Javascript1.2" href="register.php">
      Click Here</a> to Sign Up. Already a member? Then
      <a href="login.php" style="text-decoration: none" dynamicanimation="fpAnimformatRolloverFP1" fprolloverstyle="text-decoration: overline underline; color: #FF0000; font-weight: bold" onMouseOver="rollIn(this)" onMouseOut="rollOut(this)" language="Javascript1.2">
      Click Here</a> to login.</p>
      <p><b>Net-Petz is best viewed in Internet Explorer and looks bad on 
      Firefox. I'm trying to fix it but I'm new at Firefox. It's best to use 
      Internet Explorer. We have a really cool layout that doesn't work in FF 
      ;_;.</b><br>
      </p>
      <table border="4" cellspacing="1" width="706" id="AutoNumber4" height="1" bordercolorlight="#000099" bordercolordark="#000099">
        <tr>
          <td bordercolorlight="#000099" bordercolordark="#000099" align="left" valign="top" width="697" height="5" colspan="2">
          <p align="center"><font size="5" face="Comic Sans MS" color="#000099">
          News</font></td>
        </tr>
        <tr>
          <td bordercolorlight="#000099" bordercolordark="#000099" align="left" valign="top" width="358" height="91">
              <p align="center"><u><b>14th in Month of the Fizz: A few things</b></u></p>
              <p align="center">First off I'd like to say happy Easter! Now down to business. We appologize for the delay of the Easter Petz, I've been out of town. We also won't be able to do much this next week due to standardized tests . The good news, however, is that we're working on a HUGE update that should be done either this or next month. </p>
              <p align="center">PS Remember, if you find bugs on the site please email bugs@net-pets.com or team@net-petz.com so we can fix them.</p>
            <p align="center">~Lynsey </p></td>
          <td bordercolorlight="#000099" bordercolordark="#000099" align="center" width="339" height="91">
          <img border="0" src="welcome.jpg" width="300" height="300">
<? //END PAGE CONTENT ?>
</td>
  </tr>
  <tr>
    <td width="270" height="415" valign="top" align="right"> 
    </td>
  </tr>
</table>

</body>

</html>

Link to comment
Share on other sites

havent closed the main bracket {

 

<?php 
  if(isset($_COOKIE['NetPetzpreuserID']) && isset($_COOKIE['NetPetzpreuserName'])){

session_start();

   session_register('preuserName');
   session_register('preuserID');
   session_register('cimage');
   session_register('preuserAge');
   session_register('userstatus');
   
      $_SESSION['preuserID'] = $_COOKIE['NetPetzpreuserID'];
    $_SESSION['preuserName'] = $_COOKIE['NetPetzpreuserName'];

   $session=session_id();

   header("Location: ../reg/home.php");
  }
   else
   { 

session_start();
$session=session_id( );
include ("secure/config.php"); //WHEN YOU PUT THIS ON THE PAGES ADD A secure/ BEFORE CONFIG.PHP!
}
?>

Link to comment
Share on other sites

Oh shoot. Thanks. Another error I'm getting is that this page is showing up blank:

 

<?
session_start();
$session=session_id( );
include ("secure/config.php"); //WHEN YOU PUT THIS ON THE PAGES ADD A secure/ BEFORE CONFIG.PHP!
?>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
<META NAME="Description" CONTENT="Net-Petz is the newest virtual pet site on the internet. It has fun games, lots of cool petz to adopt, and tons of awesome items! It's completely free!">
<META NAME="Keywords" CONTENT="petz, net, virtual, pets, pet, fun, games, game, ">
</head>
<body>
<? if ($preuserID == 0) {
include ("../oops.htm");
die;
} ?>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="1155" id="AutoNumber1" height="802">
  <tr>
    <td width="1483" height="138" valign="top" align="right" <?
$rand = rand (1,10);
	if ($rand == 1)
		{
			echo "background=SB1_anubis.png";
		}
	elseif ($rand == 2)
		{
			echo "background=SB1_bromaro.png";
		}
	elseif ($rand == 3)
		{
			echo "background=SB1_fang.png";
		}
	elseif ($rand == 4)
		{
			echo "background=SB1_kitachia.png";
		}	
	elseif ($rand == 5)
		{
			echo "background=SB1_coarattla.png";
		}	
	elseif ($rand == 6)
		{
			echo "background=SB1_dragonous.png";
		}	
	elseif ($rand == 7)
		{
			echo "background=SB1_fizz.png";
		}	
	elseif ($rand == 
		{
			echo "background=SB1_woofosa.png";
		}
	elseif ($rand == 9)
		{
			echo "background=SB1_worfoli.png";
		}	
	elseif ($rand == 10)
		{
			echo "background=SB1_lionaya.png";
		}	
?> colspan="2">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3" height="113">
      <tr>
        <td width="15%" height="104" colspan="3" rowspan="3"> </td>
        <td width="31%" height="40"> </td>
        <td width="54%" height="104" rowspan="3"> </td>
      </tr>
      <tr>
        <td width="31%" height="23">
        <p align="center"><b>
        <font color="#FFFFFF" face="Arial" style="font-size: 11pt"><? if ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/lookup.php?Name=$preuserName><font color=#FFFFFF>$preuserName</a>"; } else { print "Guest"; } ?> - 
        <? if ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/bank.php><font color=#FFFFFF>$points NPz</a>"; } else { print "0 NPz"; } ?> - <? if ($preuserID != 0 AND $activePetID == 0) { print "No Active Pet"; } elseif ($preuserID != 0){ print "<a href=http://www.net-petz.com/reg/petDetails2.php?monopetID=$activePetID><font color=#FFFFFF>$activePetName</a> is Active"; } else { print "No Active Pet"; } ?></font></b></td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td width="325" height="657" valign="top" align="right" background="SB3.png">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="103%" id="AutoNumber4" height="42">
      <tr>
        <td width="7%" height="27" align="center"> </td>
        <td width="51%" height="27" align="center" valign="top"> 
        </td>
        <td width="92%" height="27"> </td>
      </tr>
      <tr>
        <td width="7%" height="536" align="center"> </td>
        <td width="51%" height="536" align="center" valign="top">
<font color="#FFFFFF" face="Arial"> <font color="#FFFFFF" face="Arial"><b>.:Main:.<br>
        </b> <? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/home.php><font color=#FFFFFF>Home</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com><font color=#FFFFFF>Home</a>"; } ?><br></font>
        <a href="http://www.net-petz.com/reg/mypets.php"><font color="#FFFFFF">My Petz</font></a><br>
        <a href="http://www.net-petz.com/reg/myitems.php"><font color="#FFFFFF">Inventory</font></a><br>
        <? if ($preuserID != 0){ echo "<a href=http://www.net-petz.com/reg/logout.php><font color=#FFFFFF><- Logout</font></a><br>"; } else { echo "<a href=http://www.net-petz.com/login.php><font color=#FFFFFF>Login -></font></a><br>"; } ?><br>
        <b>.:Explore:.</b><br>
        <a href="http://www.net-petz.com/reg/netlandia.php">
        <font color="#FFFFFF">Netlandia</font></a><br>
        <a href="http://www.net-petz.com/reg/city.php"><font color="#FFFFFF">Net-City</font></a><br><br>
        <b>.:Interact:.</b><br>
        <a href="http://www.net-petz.com/reg/messageboard.php">
        <font color="#FFFFFF">Net-Boards</font></a><br>
        <a href="http://www.net-petz.com/reg/inbox.php"><font color="#FFFFFF">Net-Mail</font></a><br>
        <a href="http://www.net-petz.com/reg/lookups.php"><font color="#FFFFFF">Lookups</font></a><br>
        <a href="http://www.net-petz.com/reg/ushops.php"><font color="#FFFFFF">User Shops</font></a><br><br>
        <b>.:Fun:.</b><br>
        <a href="http://www.net-petz.com/reg/games.php"><font color="#FFFFFF">Game Room</font></a><br>
        <a href="http://www.net-petz.com/reg/stuff.php"><font color="#FFFFFF">Fun Stuff</font></a><br><br>
        <b>.:Options:.</b><br>
        <a href="http://www.net-petz.com/reg/userInfo.php">
        <font color="#FFFFFF">User Options</font></a><br>
        <a href="http://www.net-petz.com/reg/luedit.php"><font color="#FFFFFF">Lookup Options</font></a><br>
        <a href="http://www.net-petz.com/reg/boardpreff.php">
        <font color="#FFFFFF">Board Options</font></a><br><br>
        <b>.:More:.</b><br>
<? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/help.php><font color=#FFFFFF>About Us</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/help.php><font color=#FFFFFF>About Us</a>"; } ?><br>
<? if ($preuserID != 0){ echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/reg/contact.php><font color=#FFFFFF>Contact Us</a>"; } else { echo "<font color=#FFFFFF face=Arial><a href=http://www.net-petz.com/contact.php><font color=#FFFFFF>Contact Us</a>"; } ?></td>
        <td width="92%" height="536"> </td>
      </tr>
    </table>
    </td>
    <td width="1213" height="1002" valign="top" align="center" rowspan="2">
<? include ("secure/randoms.php"); ?>
<? //PAGE CONTENT ?>
<font color="#CEE7FF" size="2" face="Arial, Helvetica, sans-serif"><strong>
                                Login</strong></font></div></td>
                          </tr>
                          <tr>
                            <td bgcolor="#CEE7FF">
                              <div align="center">
                                <form method="POST" action="reg/secure/index.php">
                                  <table width="300" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td width="219">
                                      <p align="left"><font face="Arial, Helvetica, sans-serif" size="2">
                                        <b> User Name: </b></font></td>
                                      <td width="181"><font face="Arial, Helvetica, sans-serif" size="2">
                                        <input type="text" name="preuserName" size="20">
                                      </font></td>
                                    </tr>
                                    <tr>
                                      <td width="219"><font face="Arial, Helvetica, sans-serif" size="2">
                                         <b>Password:</b></font></td>
                                      <td width="181"><font face="Arial, Helvetica, sans-serif" size="2">
                                        <input type="password" name="preuserPassword" size="20">
                                      </font></td>
                                    </tr>
                                    <tr>
                                      <td colspan="2" height="2">
                                        <div align="center"><font face="Arial, Helvetica, sans-serif" size="2">  </font></div></td>
                                    </tr>
                                    <tr>
                                      <td colspan="2" height="2">
                                        <div align="center"><font face="Arial, Helvetica, sans-serif" size="2">
                                          <input type=submit name="Submit" value="Submit">
                                      </font></div></td>
                                    </tr>
                                  </table>
                                </form>
  <? //END PAGE CONTENT ?>
</td>
  </tr>
  <tr>
    <td width="270" height="415" valign="top" align="right"> 
    </td>
  </tr>
</table>

</body>

</html>

Link to comment
Share on other sites

The table alignment has gone wrong here

 

<td width="1483" height="138" valign="top" align="right" <?
$rand = rand (1,10);
	if ($rand == 1)
		{
			echo "background=SB1_anubis.png";
		}
	elseif ($rand == 2)
		{
			echo "background=SB1_bromaro.png";
		}
	elseif ($rand == 3)
		{
			echo "background=SB1_fang.png";
		}
	elseif ($rand == 4)
		{
			echo "background=SB1_kitachia.png";
		}	
	elseif ($rand == 5)
		{
			echo "background=SB1_coarattla.png";
		}	
	elseif ($rand == 6)
		{
			echo "background=SB1_dragonous.png";
		}	
	elseif ($rand == 7)
		{
			echo "background=SB1_fizz.png";
		}	
	elseif ($rand == 
		{
			echo "background=SB1_woofosa.png";
		}
	elseif ($rand == 9)
		{
			echo "background=SB1_worfoli.png";
		}	
	elseif ($rand == 10)
		{
			echo "background=SB1_lionaya.png";
		}	
?> colspan="2">

have included the output inside the <td> tag and opened another table without the closing the first

Link to comment
Share on other sites

<td width="1483" height="138" valign="top" align="right" <?
$rand = rand (1,10);
	if ($rand == 1)
		{
			echo "background=SB1_anubis.png";
		}
	elseif ($rand == 2)
		{
			echo "background=SB1_bromaro.png";
		}
	elseif ($rand == 3)
		{
			echo "background=SB1_fang.png";
		}
	elseif ($rand == 4)
		{
			echo "background=SB1_kitachia.png";
		}	
	elseif ($rand == 5)
		{
			echo "background=SB1_coarattla.png";
		}	
	elseif ($rand == 6)
		{
			echo "background=SB1_dragonous.png";
		}	
	elseif ($rand == 7)
		{
			echo "background=SB1_fizz.png";
		}	
	elseif ($rand == 
		{
			echo "background=SB1_woofosa.png";
		}
	elseif ($rand == 9)
		{
			echo "background=SB1_worfoli.png";
		}	
	elseif ($rand == 10)
		{
			echo "background=SB1_lionaya.png";
		}	
?> colspan="2">

wat exactly are u doin here? coz u have an echo statement inside the td tag

shudnt it be <td><?php echo "somethin"; ?></td>

Link to comment
Share on other sites

This won't solve you problem, but an easier way to write this code is:

    <td width="1483" height="138" valign="top" align="right" 
<?php
$imgs = ('anubis','bromaro','fang','kitachia','coarattla','dragonous','fizz','woofosa','worfoli','lionaya');
$rand = rand (0,9);
echo ' background="SB1_' . $imgs[$i] . '"';
?> colspan="2">

 

Ken

Link to comment
Share on other sites

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.