Jump to content


Photo

unexpected T-VARIABLE in code [-SOLVED-]


  • Please log in to reply
6 replies to this topic

#1 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 06 August 2006 - 03:34 AM

I get this error when I use the following code.. and it worked 2 mins ago. and i didnt change anything..
Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /home/zyco/public_html/newlayout/func.php on line 191


func.php
<?php
function DisplayLinks(){
?>
<div align=left>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
 WIDTH=550 HEIGHT=27>
<PARAM NAME=movie VALUE="tags3x_vl.swf?tarframe=_self&exbackground=CCFF99&makenavfield0=Home&makenavurl0=home&makenavfield1=Register&makenavurl1=register&makenavfield2=Contact Us&makenavurl2=contact&makenavfield3=Forums&makenavurl3=http://www.forums.zycogaming.xerodefect.com">
<PARAM NAME=loop VALUE=false>
<PARAM NAME=menu VALUE=false>
<PARAM NAME=quality VALUE=high>
<PARAM NAME=scale VALUE=noborder>
<PARAM NAME=salign VALUE=LT>
<PARAM NAME=wmode VALUE=transparent>
<PARAM NAME=bgcolor VALUE=#80800>

<EMBED src="files/tags3x_vl.swf?tarframe=_self&exbackground=CCFF99&makenavfield0=Home&makenavurl0=home&makenavfield1=Register&makenavurl1=register&makenavfield2=Contact Us&makenavurl2=contact&makenavfield3=Forums&makenavurl3=http://www.forums.zycogaming.xerodefect.com" loop=false menu=false quality=high scale=noborder salign=LT wmode=transparent bgcolor=#FFFFFF  WIDTH=550 HEIGHT=27 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>

</OBJECT>

<script language = "javascript">
<!--
theObjects = document.getElementsByTagName("object");
for (var i = 0; i < theObjects.length; i++) {
theObjects[i].outerHTML = theObjects[i].outerHTML;}
//-->
</script>
</div>
<?
}
?>

<?php
function show_errorPage(){
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- DW6 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>ZycoWorld</title>
<link rel="stylesheet" href="files/3col_rightNav.css" type="text/css">
</head>
<body link="#FF3333" vlink="#FF3333" alink="#000000"> 
<div id="masthead"> 
  <h1 id="siteName">Zyco</h1> 
  <div id="globalNav"> 
 <? DisplayLinks(); ?></div> 
  <br> 
<hr align="left" width=55%>
<h2 id="pageName">Home</h2>
<!-- end masthead --> 
<div id="content"> 
<hr>
  <div><span class="feature"> 
    <h3>You Must Be Logged In</h3> 
    <p> 
    You cannot view this page, you need to Login at the <A HREF="main.php">HOME</A> Page, or <A HREF=register>REGISTER<A> to be able to view.
  </div> 
  <div class="story"> 
    <h3></h3> 
    <p>
    </p> 
    <p>
    </p> 
  </div> 
</div> 
<!-- end content --> 
  <div id="navBar"> 
    <h3>Please Login</h3>
    <form action="" method="post">
      <table align="center" border="0" cellspacing="0" cellpadding="3">
<tr><td >Username:</td><td><input type="text" name="user" maxlength="30"></td></tr>
<tr><td >Password:</td><td><input type="password" name="pass" maxlength="30"></td></tr>
<tr><td colspan="2" align="left" ><input type="checkbox" name="remember">
<font size="2">Remember</td></tr>
<tr><td colspan="2" align="right"><input type="submit" name="sublogin" value="Login"></td></tr>
<tr><td  colspan="2" align="right"><a href="register"><img 
	src=/images/reg_img.gif
	name=pic1
onMouseOver="document.pic1.src='/images/reg_img2.GIF' " onMouseOut="document.pic1.src='/images/reg_img.gif' " 
></a></td></tr>
</table>
    </form>
  </div> 
  <div class="relatedLinks"> 
    <h3>Affiliates</h3> 
    <ul> 
      <li><a href="http://www.flamelicker.com/newsite">Flamelicker</a></li> 
	  
    </ul> 
  </div> 
  <div class="relatedLinks"> 
    <h3>Other</h3>
    <ul> 
      <li><A HREF="http://www.zycogaming.xerodefect.com/brenden">Brenden's zPage</A></li>
	  </li> 
    </ul> 
  </div> 
</div> 
<!--end navBar div --> 
<div id="siteInfo"> 
  <p><img src="" width="44" height="22"> &copy;2006 ZycoWorld.com</p>
  <div align=center>
  <ul>
  <A HREF=http://www.zycogaming.xerodefect.com/home>Home</A> | 
  <A HREF=http://www.zycogaming.xerodefect.com/contactUs>Contact Us</A>
  </ul>
  </div>
</div> 
</body>
</html>
<?
}

function getVideos() {

	$path = $_ENV['DOCUMENT_ROOT'];
	$d = $path.'/uploads/uVideos/';
	$dir = opendir($d);
	while ($f = readdir($dir)) {
	 if (eregi("\.swf",$f))
			$files[]=$f;
	}
	return $files;
}

function navBar() {
?>
<div id="navBar"> 
  <div id="search"> 
<form action="http://www.zycogaming.xerodefect.com/cgi-sys/entropysearch.cgi" target="searchwindow">
Zyco SiteSearch: <br><input name="query" value="" type="text">
<input name="user" value="zyco" type="hidden">
<input name="basehref" value="http://zycogaming.xerodefect.com" type="hidden">
<input name="template" value="default" type="hidden">
<input value="Search" type="submit">
</form>
  </div> 
  <div id="sectionLinks"> 
    <h3>Your Controls</h3>
    <ul> 
      <li><a href="home">Home</a></li> 
      <li><a href="uVid">Video Upload</a></li> 
      <li><a href="uPic">Picture Upload</a></li> 
      <li><a href="editProfile">Edit Profile</a></li> 
      <li><a href="/<?php echo "$_SESSION[username]"; ?>.html ">View Profile</a></li> 
      <li><a href="gamesList">Games</a></li> 
    </ul> 
  </div> 
  <div class="relatedLinks"> 
    <h3>Affiliates</h3> 
    <ul> 
      <li><a href="http://www.flamelicker.com/newsite">Flamelicker</a></li> 
	  <li><a href="http://www.xerodefect.com">XeroDefect Studios</a></li> 
    </ul> 
  </div> 
  <div class="relatedLinks"> 
    <h3>Other</h3>
    <ul> 
      <li><A HREF="http://www.zycogaming.xerodefect.com/brenden">Brenden's zPage</A></li>
	  </li> 
    </ul> 
  </div> 
</div> 
<!--end navBar div --> 
<?
}
?>

<?
function siteInfo() {
?>
<div id="siteInfo"> 
  <p><img src="" width="44" height="22"> &copy;2006 ZycoWorld.com</p>
  <div align=center>
  <ul>
  <A HREF=home>Home</A> | 
  <A HREF=/contact>Contact Us</A>
  </ul>
  </div>
</div> 
<?
}
?>

<?
function editProfile() {
?>
<div align=center>*You are curently updating the profile for User: <? echo "<a href="$_SESSION[username].html">$_SESSION[username]</a>"; ?>. Click the name to see your profile.</div></b>
<p>
<hr>
<p>
<?php
$currentUser = "$_SESSION[username].html";
$loadcontent = "$currentUser"; 
    if($save_file) { 
        $savecontent = stripslashes($savecontent); 
        $fp = @fopen($loadcontent, "w"); 
        if ($fp) { 
            fwrite($fp, $savecontent); 
            fclose($fp); 
print '<div align=center><font color=red><b>Profile has been updated! Click <a href='.$_SERVER[PHP_SELF].'>HERE</a>to refresh the Editor.</b></font></a></div>'; 

} 
} 
    $fp = @fopen($loadcontent, "r"); 
        $loadcontent = fread($fp, filesize($loadcontent)); 
$lines = explode("\n", $loadcontent);
$count = count($lines);
        $loadcontent = htmlspecialchars($loadcontent); 
        fclose($fp); 
for ($a = 1; $a < $count+1; $a++) {
$line .= "$a\n";
}
?> 

<form method=post action="<?=$_SERVER[PHP_SELF]?>"> 
<table width="100%" valign="top" border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td width="97%" align="center" valign="top"><textarea style="text-align: left; padding: 0px; overflow: auto; border: 3px groove; font-size: 12px" name="savecontent" cols="100" rows="25" wrap="OFF"><?=$loadcontent?></textarea></td>
  </tr>
</table> 
<div align=center>
<input type="submit" name="save_file" value="-Save-">  |  <input type="submit" name="save_file" value="-Update Profile-">
</div>    
</form>
<p>
<hr>
<p>
<b>Want a profile like mine? Don't know HTML? No worries!! Copy the code below into the box above, edit it and BAM! You have a snazzy profile!! Just edit the CAPITAL PHRASES to match yourself.</b>
<br>
<textarea cols=100 rows=25>
<html>
<head>
<title>ENTER A TITLE TO YOUR PAGE HERE</title>
</head>
<body bgcolor=#F0E68C>
<div align=center>
<h1><u>YOUR USERNAME HERE</u></h1><br>
<A HREF=http://www.zycogaming.xerodefect.com/index.php>[HOME]</A>
<A HREF=http://www.zycogaming.xerodefect.com/register.php>[REGISTER]</A>
<A HREF=http://www.zycogaming.xerodefect.com/contactus.php>[CONTACT US]</A>
</div>
<p><p><p>
<hr>
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 BGCOLOR=FFCC66 ALIGN=CENTER>
<TR>
 <TD ALIGN=left HEIGHT=25>
YOUR NAME HERE
</TD>
</TR>
<TR>
 <TD ALIGN=left HEIGHT=100>
<img src ="YOUR IMAGE HERE" align ="left"><br>
Name: YOUR NAME HERE<br>
Age: YOUR AGE HERE<br>
Location: YOUR LOCATION HERE<br>
</TD>
</TR>
</TABLE>
<p>
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 BGCOLOR=FFCC66 ALIGN=CENTER WIDTH=350>
<TR>
 <TD>
<i>About Me</i>:<br>
ENTER YOUR BIO OR FACTS HERE, ANYTHING YOU LIKE
</TD>
</TR>
</TABLE>
<br>
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 BGCOLOR=FFCC66 ALIGN=CENTER WIDTH=350>
<TR>
 <TD>
<i>Music</i>:<br>
ENTER THE MUSIC YOU LISTEN TO, HERE
</TD>
</TR>
</TABLE>
</textarea>
<p>
<p>
<b>Want to add more sections?? Just modify this code and paste into you7r profile!!</b>
<br>
<textarea cols=100 rows=25>
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 BGCOLOR=FFCC66 ALIGN=CENTER WIDTH=350>
<TR>
 <TD>
<i>ENTER HEADER HERE</i>:<br>
ENTER CONTENT HERE</TD>
</TR>
</TABLE>
</textarea>
<?
}
?>

<?
function headerLinks() {
?>
  <span class="relatedLinks">Hello,
  <strong><?php echo "$_SESSION[username]"; ?></strong>
.</span> | <A HREF=logout>Logout</A> | <a href="http://www.zycogaming.xerodefect.com/<?php echo "$_SESSION[username]"; ?>.html">View Profile</a> | <a href="editProfile">Edit Profile</a> |<br> 
<span class="feature">Your zPage URL: http://www.zycogaming.xerodefect.com/<?php echo "$_SESSION[username]"; ?>.html
</span>
<?
}
?>

Link shortener with advanced, detailed statistics:

http://tyny.us/

#2 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 06 August 2006 - 04:20 AM

*bump* (but only over 3 topics. :P)

c'mon ppl haha, I've looked, I cannot see any erroer, i normally can, but IDK whats wrong .. and im getting mad cuz nobody can view my site just cuz one little syntax error!!
Link shortener with advanced, detailed statistics:

http://tyny.us/

#3 nethnet

nethnet
  • Members
  • PipPipPip
  • Advanced Member
  • 284 posts
  • LocationPhiladelphia, PA, USA

Posted 06 August 2006 - 04:30 AM

I dont feel like counting.  Post line 191 and surrounding lines (mark 191)
"Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep."  --Scott Adams

Current project: nethnet.com

#4 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 06 August 2006 - 04:37 AM

LINES 181 - 195

<?
function siteInfo() {
?>
<div id="siteInfo"> 
  <p><img src="" width="44" height="22"> &copy;2006 ZycoWorld.com</p>
  <div align=center>
  <ul>
  <A HREF=home>Home</A> | 
  <A HREF=/contact>Contact Us</A>
  </ul>
  </div> //LINE 191
</div> 
<?
}
?>

Link shortener with advanced, detailed statistics:

http://tyny.us/

#5 Prismatic

Prismatic
  • Members
  • PipPipPip
  • Advanced Member
  • 503 posts
  • LocationSan Diego

Posted 06 August 2006 - 05:24 AM

That's not where the error is..

Or might be, I hate how you break out of php, show html, and go back into it  :P

<?php
function DisplayLinks(){
?>
<div align=left>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
 WIDTH=550 HEIGHT=27>
<PARAM NAME=movie VALUE="tags3x_vl.swf?tarframe=_self&exbackground=CCFF99&makenavfield0=Home&makenavurl0=home&makenavfield1=Register&makenavurl1=register&makenavfield2=Contact Us&makenavurl2=contact&makenavfield3=Forums&makenavurl3=http://www.forums.zycogaming.xerodefect.com">
<PARAM NAME=loop VALUE=false>
<PARAM NAME=menu VALUE=false>
<PARAM NAME=quality VALUE=high>
<PARAM NAME=scale VALUE=noborder>
<PARAM NAME=salign VALUE=LT>
<PARAM NAME=wmode VALUE=transparent>
<PARAM NAME=bgcolor VALUE=#80800>

<EMBED src="files/tags3x_vl.swf?tarframe=_self&exbackground=CCFF99&makenavfield0=Home&makenavurl0=home&makenavfield1=Register&makenavurl1=register&makenavfield2=Contact Us&makenavurl2=contact&makenavfield3=Forums&makenavurl3=http://www.forums.zycogaming.xerodefect.com" loop=false menu=false quality=high scale=noborder salign=LT wmode=transparent bgcolor=#FFFFFF  WIDTH=550 HEIGHT=27 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>

</OBJECT>

<script language = "javascript">
<!--
theObjects = document.getElementsByTagName("object");
for (var i = 0; i < theObjects.length; i++) {
theObjects[i].outerHTML = theObjects[i].outerHTML;}
//-->
</script>
</div>
<?
}
?>

<?php
function show_errorPage(){
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- DW6 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>ZycoWorld</title>
<link rel="stylesheet" href="files/3col_rightNav.css" type="text/css">
</head>
<body link="#FF3333" vlink="#FF3333" alink="#000000"> 
<div id="masthead"> 
  <h1 id="siteName">Zyco</h1> 
  <div id="globalNav"> 
 <? DisplayLinks(); ?></div> 
  <br> 
<hr align="left" width=55%>
<h2 id="pageName">Home</h2>
<!-- end masthead --> 
<div id="content"> 
<hr>
  <div><span class="feature"> 
    <h3>You Must Be Logged In</h3> 
    <p> 
    You cannot view this page, you need to Login at the <A HREF="main.php">HOME</A> Page, or <A HREF=register>REGISTER<A> to be able to view.
  </div> 
  <div class="story"> 
    <h3></h3> 
    <p>
    </p> 
    <p>
    </p> 
  </div> 
</div> 
<!-- end content --> 
  <div id="navBar"> 
    <h3>Please Login</h3>
    <form action="" method="post">
      <table align="center" border="0" cellspacing="0" cellpadding="3">
<tr><td >Username:</td><td><input type="text" name="user" maxlength="30"></td></tr>
<tr><td >Password:</td><td><input type="password" name="pass" maxlength="30"></td></tr>
<tr><td colspan="2" align="left" ><input type="checkbox" name="remember">
<font size="2">Remember</td></tr>
<tr><td colspan="2" align="right"><input type="submit" name="sublogin" value="Login"></td></tr>
<tr><td  colspan="2" align="right"><a href="register"><img 
	src=/images/reg_img.gif
	name=pic1
onMouseOver="document.pic1.src='/images/reg_img2.GIF' " onMouseOut="document.pic1.src='/images/reg_img.gif' " 
></a></td></tr>
</table>
    </form>
  </div> 
  <div class="relatedLinks"> 
    <h3>Affiliates</h3> 
    <ul> 
      <li><a href="http://www.flamelicker.com/newsite">Flamelicker</a></li> 
	  
    </ul> 
  </div> 
  <div class="relatedLinks"> 
    <h3>Other</h3>
    <ul> 
      <li><A HREF="http://www.zycogaming.xerodefect.com/brenden">Brenden's zPage</A></li>
	  </li> 
    </ul> 
  </div> 
</div> 
<!--end navBar div --> 
<div id="siteInfo"> 
  <p><img src="" width="44" height="22"> &copy;2006 ZycoWorld.com</p>
  <div align=center>
  <ul>
  <A HREF=http://www.zycogaming.xerodefect.com/home>Home</A> | 
  <A HREF=http://www.zycogaming.xerodefect.com/contactUs>Contact Us</A>
  </ul>
  </div>
</div> 
</body>
</html>
<?
}

function getVideos() {

	$path = $_ENV['DOCUMENT_ROOT'];
	$d = $path.'/uploads/uVideos/';
	$dir = opendir($d);
	while ($f = readdir($dir)) {
	 if (eregi("\.swf",$f))
			$files[]=$f;
	}
	return $files;
}

function navBar() {
?>
<div id="navBar"> 
  <div id="search"> 
<form action="http://www.zycogaming.xerodefect.com/cgi-sys/entropysearch.cgi" target="searchwindow">
Zyco SiteSearch: <br><input name="query" value="" type="text">
<input name="user" value="zyco" type="hidden">
<input name="basehref" value="http://zycogaming.xerodefect.com" type="hidden">
<input name="template" value="default" type="hidden">
<input value="Search" type="submit">
</form>
  </div> 
  <div id="sectionLinks"> 
    <h3>Your Controls</h3>
    <ul> 
      <li><a href="home">Home</a></li> 
      <li><a href="uVid">Video Upload</a></li> 
      <li><a href="uPic">Picture Upload</a></li> 
      <li><a href="editProfile">Edit Profile</a></li> 
      <li><a href="/<?php echo "$_SESSION[username]"; ?>.html ">View Profile</a></li> 
      <li><a href="gamesList">Games</a></li> 
    </ul> 
  </div> 
  <div class="relatedLinks"> 
    <h3>Affiliates</h3> 
    <ul> 
      <li><a href="http://www.flamelicker.com/newsite">Flamelicker</a></li> 
	  <li><a href="http://www.xerodefect.com">XeroDefect Studios</a></li> 
    </ul> 
  </div> 
  <div class="relatedLinks"> 
    <h3>Other</h3>
    <ul> 
      <li><A HREF="http://www.zycogaming.xerodefect.com/brenden">Brenden's zPage</A></li>
	  </li> 
    </ul> 
  </div> 
</div> 
<!--end navBar div --> 
<?
}
?>

<?
function siteInfo() {
?>
<div id="siteInfo"> 
  <p><img src="" width="44" height="22"> &copy;2006 ZycoWorld.com</p>
  <div align=center>
  <ul>
  <A HREF=home>Home</A> | 
  <A HREF=/contact>Contact Us</A>
  </ul>
  </div>
</div> 
<?
}
?>

<?
function editProfile() {
?>
<div align=center>*You are curently updating the profile for User: <? echo "<a href='". $_SESSION[username] ."html'>". $_SESSION[username] ."</a>"; ?>. Click the name to see your profile.</div></b>
<p>
<hr>
<p>
<?php
$currentUser = "$_SESSION[username].html";
$loadcontent = "$currentUser"; 
    if($save_file) { 
        $savecontent = stripslashes($savecontent); 
        $fp = @fopen($loadcontent, "w"); 
        if ($fp) { 
            fwrite($fp, $savecontent); 
            fclose($fp); 
print '<div align=center><font color=red><b>Profile has been updated! Click <a href='.$_SERVER[PHP_SELF].'>HERE</a>to refresh the Editor.</b></font></a></div>'; 

} 
} 
    $fp = @fopen($loadcontent, "r"); 
        $loadcontent = fread($fp, filesize($loadcontent)); 
$lines = explode("\n", $loadcontent);
$count = count($lines);
        $loadcontent = htmlspecialchars($loadcontent); 
        fclose($fp); 
for ($a = 1; $a < $count+1; $a++) {
$line .= "$a\n";
}
?> 

<form method=post action="<?=$_SERVER[PHP_SELF]?>"> 
<table width="100%" valign="top" border="0" cellspacing="1" cellpadding="1">
  <tr>
    <td width="97%" align="center" valign="top"><textarea style="text-align: left; padding: 0px; overflow: auto; border: 3px groove; font-size: 12px" name="savecontent" cols="100" rows="25" wrap="OFF"><?=$loadcontent?></textarea></td>
  </tr>
</table> 
<div align=center>
<input type="submit" name="save_file" value="-Save-">  |  <input type="submit" name="save_file" value="-Update Profile-">
</div>    
</form>
<p>
<hr>
<p>
<b>Want a profile like mine? Don't know HTML? No worries!! Copy the code below into the box above, edit it and BAM! You have a snazzy profile!! Just edit the CAPITAL PHRASES to match yourself.</b>
<br>
<textarea cols=100 rows=25>
<html>
<head>
<title>ENTER A TITLE TO YOUR PAGE HERE</title>
</head>
<body bgcolor=#F0E68C>
<div align=center>
<h1><u>YOUR USERNAME HERE</u></h1><br>
<A HREF=http://www.zycogaming.xerodefect.com/index.php>[HOME]</A>
<A HREF=http://www.zycogaming.xerodefect.com/register.php>[REGISTER]</A>
<A HREF=http://www.zycogaming.xerodefect.com/contactus.php>[CONTACT US]</A>
</div>
<p><p><p>
<hr>
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 BGCOLOR=FFCC66 ALIGN=CENTER>
<TR>
 <TD ALIGN=left HEIGHT=25>
YOUR NAME HERE
</TD>
</TR>
<TR>
 <TD ALIGN=left HEIGHT=100>
<img src ="YOUR IMAGE HERE" align ="left"><br>
Name: YOUR NAME HERE<br>
Age: YOUR AGE HERE<br>
Location: YOUR LOCATION HERE<br>
</TD>
</TR>
</TABLE>
<p>
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 BGCOLOR=FFCC66 ALIGN=CENTER WIDTH=350>
<TR>
 <TD>
<i>About Me</i>:<br>
ENTER YOUR BIO OR FACTS HERE, ANYTHING YOU LIKE
</TD>
</TR>
</TABLE>
<br>
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 BGCOLOR=FFCC66 ALIGN=CENTER WIDTH=350>
<TR>
 <TD>
<i>Music</i>:<br>
ENTER THE MUSIC YOU LISTEN TO, HERE
</TD>
</TR>
</TABLE>
</textarea>
<p>
<p>
<b>Want to add more sections?? Just modify this code and paste into you7r profile!!</b>
<br>
<textarea cols=100 rows=25>
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=0 BGCOLOR=FFCC66 ALIGN=CENTER WIDTH=350>
<TR>
 <TD>
<i>ENTER HEADER HERE</i>:<br>
ENTER CONTENT HERE</TD>
</TR>
</TABLE>
</textarea>
<?
}
?>

<?
function headerLinks() {
?>
  <span class="relatedLinks">Hello,
  <strong><?php echo "$_SESSION[username]"; ?></strong>
.</span> | <A HREF=logout>Logout</A> | <a href="http://www.zycogaming.xerodefect.com/<?php echo "$_SESSION[username]"; ?>.html">View Profile</a> | <a href="editProfile">Edit Profile</a> |<br> 
<span class="feature">Your zPage URL: http://www.zycogaming.xerodefect.com/<?php echo "$_SESSION[username]"; ?>.html
</span>
<?
}
?>

See if that fixes it

Also, when echoing things like variables, or session variables, or any variable, dont encase it in quotations.

Example, you have this:
<?php echo "$_SESSION[username]"; ?>

When it should be,
<?php echo $_SESSION['username']; ?>


#6 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 06 August 2006 - 05:34 AM

I copied all of your original script into my editor, and it said that line 191 is
<div align=center>*You are curently updating the profile for User: 
<? echo "<a href="$_SESSION[username].html">$_SESSION[username]</a>"; ?>. 
Click the name to see your profile.</div></b>
The error is in the echo statement -- too many double quotes with out escaping them or using single quotes or using concatenation.
Try:
<div align=center>*You are curently updating the profile for User: 
<?php echo '<a href="' . $_SESSION['username'] . '.html">' . $_SESSION['username'] . '</a>'; ?>.
 Click the name to see your profile.</div></b>

Ken

#7 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 06 August 2006 - 05:52 AM

Thank you both!! I GOT IT TO WORK! Oh thank you!!! :D
Link shortener with advanced, detailed statistics:

http://tyny.us/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users