MySQL_Narb Posted October 15, 2009 Share Posted October 15, 2009 Code: <?php session_start(); ?> <?php require "global_settings.php"; ?> <title><?php echo $sitetitle; ?></title> <font face='arial' size='2'></a> <?php session_start(); ?> <center> <style> a:link { color:#24374C; text-decoration:none; } a:visited { color:#24374C; text-decoration:none; } a:active { outline: none; color:#24374C; text-decoration:none; } body {background-color:#b0c4de} div.box { width:250px; padding:10px; border:3px double #000000; margin:10px; background-color:#74AFF2; } p { border-top-style:dotted; border-right-style:solid; border-bottom-style:dotted; border-left-style:solid; } div.menu-blue { BORDER-RIGHT: #333366 1px solid; BORDER-LEFT: #6699cc 1px solid; BORDER-TOP: #6699cc 1px solid; BORDER-BOTTOM: #333366 1px solid; FONT-WEIGHT: normal; COLOR: #ffffff; BACKGROUND-COLOR: #23559C; TEXT-DECORATION: none; font-stretch : condensed; } .menu-top { BORDER-RIGHT: 1px solid #333366; BORDER-TOP: 1px solid #6699CC; FONT-WEIGHT: normal; BORDER-LEFT: 1px solid #6699CC; COLOR: #FFFFFF; BORDER-BOTTOM: 1px solid #333366; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #23559C; TEXT-DECORATION: none; font-stretch : condensed } </style> <center> <div class='menu-blue'> <div align="center"> <table width="600" cellspacing="1" cellpadding="5" style="background-color:#23559C"> <tr> <td style="background-color:#FFFFFF"> <div align="center"> <table border="0"> </form> </table> <?php if ($_SESSION['username']) echo " <form action='signature_changed.php' method='POST'> <div class='box'><h3>Update signature</h3> <input type='hidden' name='name' value='<?php echo $_SESSION['username']; ?>'> <textarea name='newsig' cols='20' rows='5'> </textarea><input type='submit' value='Change'></a> </div> </form>"; else die ("Narb."); ?> Error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/a5488351/public_html/ucp.php on line 81 Quote Link to comment Share on other sites More sharing options...
mrMarcus Posted October 15, 2009 Share Posted October 15, 2009 for starters, you have started a session twice in almost as many lines .. eliminate the second session_start(); try taking away that initial whitespace before the first session_start(): <?php session_start(); ?> and, check this line: <input type='hidden' name='name' value='<?php echo $_SESSION['username']; ?>'> to: <input type='hidden' name='name' value='".$_SESSION['username']."'> next time, at least indicate where line:81 is in the script. Quote Link to comment Share on other sites More sharing options...
MySQL_Narb Posted October 15, 2009 Author Share Posted October 15, 2009 I still get the same error message. Quote Link to comment Share on other sites More sharing options...
mrMarcus Posted October 15, 2009 Share Posted October 15, 2009 and you still didn't post line#81. the script you showed, is that ucp.php? Quote Link to comment Share on other sites More sharing options...
MySQL_Narb Posted October 15, 2009 Author Share Posted October 15, 2009 Yes, and this time it said line 83. Quote Link to comment Share on other sites More sharing options...
mrMarcus Posted October 15, 2009 Share Posted October 15, 2009 oh man, would you kindly post line#83 then? Quote Link to comment Share on other sites More sharing options...
MySQL_Narb Posted October 15, 2009 Author Share Posted October 15, 2009 I have posted line 83. It's the same as line 81, in the other code I posted. The one above this post. The only reason it's 83 instead of 81, is because I removed the white space like you said. Quote Link to comment Share on other sites More sharing options...
runnerjp Posted October 15, 2009 Share Posted October 15, 2009 Change <input type='hidden' name='name' value='<?php echo $_SESSION['username']; ?>'> to <input type='hidden' name='name' value='<?php echo '".$_SESSION['username']."'"; ?> Quote Link to comment Share on other sites More sharing options...
runnerjp Posted October 15, 2009 Share Posted October 15, 2009 opps noticed marcus said this sorry Quote Link to comment Share on other sites More sharing options...
mrMarcus Posted October 15, 2009 Share Posted October 15, 2009 I have posted line 83. It's the same as line 81, in the other code I posted. The one above this post. The only reason it's 83 instead of 81, is because I removed the white space like you said. you're posting the error code, i need to see the php code on line 81 in the file ucp.php. Quote Link to comment Share on other sites More sharing options...
MySQL_Narb Posted October 15, 2009 Author Share Posted October 15, 2009 Code: <?php session_start(); ?> <?php require "global_settings.php"; ?> <title><?php echo $sitetitle; ?></title> <font face='arial' size='2'></a> <?php session_start(); ?> <center> <style> a:link { color:#24374C; text-decoration:none; } a:visited { color:#24374C; text-decoration:none; } a:active { outline: none; color:#24374C; text-decoration:none; } body {background-color:#b0c4de} div.box { width:250px; padding:10px; border:3px double #000000; margin:10px; background-color:#74AFF2; } p { border-top-style:dotted; border-right-style:solid; border-bottom-style:dotted; border-left-style:solid; } div.menu-blue { BORDER-RIGHT: #333366 1px solid; BORDER-LEFT: #6699cc 1px solid; BORDER-TOP: #6699cc 1px solid; BORDER-BOTTOM: #333366 1px solid; FONT-WEIGHT: normal; COLOR: #ffffff; BACKGROUND-COLOR: #23559C; TEXT-DECORATION: none; font-stretch : condensed; } .menu-top { BORDER-RIGHT: 1px solid #333366; BORDER-TOP: 1px solid #6699CC; FONT-WEIGHT: normal; BORDER-LEFT: 1px solid #6699CC; COLOR: #FFFFFF; BORDER-BOTTOM: 1px solid #333366; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; BACKGROUND-COLOR: #23559C; TEXT-DECORATION: none; font-stretch : condensed } </style> <center> <div class='menu-blue'> <div align="center"> <table width="600" cellspacing="1" cellpadding="5" style="background-color:#23559C"> <tr> <td style="background-color:#FFFFFF"> <div align="center"> <table border="0"> </form> </table> <?php if ($_SESSION['username']) echo " <form action='signature_changed.php' method='POST'> <div class='box'><h3>Update signature</h3> <input type='hidden' name='name' value='<?php echo $_SESSION['username']; ?>'> <textarea name='newsig' cols='20' rows='5'> </textarea><input type='submit' value='Change'></a> </div> </form>"; else die ("Narb."); ?> Quote Link to comment Share on other sites More sharing options...
Coreye Posted October 16, 2009 Share Posted October 16, 2009 If you're still getting that error, you must not of updated the code. I just tried your code and it works fine with: <?php if ($_SESSION['username']) { echo "<form action='signature_changed.php' method='POST'> <div class='box'><h3>Update signature</h3> <input type='hidden' name='name' value='<?php echo '".$_SESSION['username']."'; ?>'> <textarea name='newsig' cols='20' rows='5'> </textarea><input type='submit' value='Change'></a> </div> </form>"; } else { die ("Narb."); } ?> Quote Link to comment Share on other sites More sharing options...
Coreye Posted October 16, 2009 Share Posted October 16, 2009 Ignore the above post... try: <?php if ($_SESSION['username']) { echo "<form action='signature_changed.php' method='POST'> <div class='box'><h3>Update signature</h3> <input type='hidden' name='name' value='" . $_SESSION['username'] . "'> <textarea name='newsig' cols='20' rows='5'> </textarea><input type='submit' value='Change'></a> </div> </form>"; } else { die ("Narb."); } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.