FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


ERROR: unexpected '<' in





xxmassive
I've a problem with the error
Code:
Parse error: syntax error, unexpected '<' in /home/xxmassiv/domains/xxmassive.frihost.org/public_html/inc/r-menu.php on line 12


I don΄t know how to fix it, so I looked a bit around on the internet and in mostly cases the answer was that it was a virus. Is that possible. Can you guys help me, this is the full code:
Code:
<div class="r-menu">
<div class="r-menuhead">Account</div>
<table width="125px">
<th align="left">
<?php
   session_start();
if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID']) == ''))
   {
        echo ("You are not logged in, please <a href=\"login.php\">login</a> or <a href=\"register.php\">register</a>.");
        exit;
   }
<?php
             echo ("Username: <?php echo "$_GET['username]";?><br \>");
?>
</div>
</th>
</table>
<div class="r-menuhead">Profile</div>
<table width="125px">
<th align="left">
<?php
   session_start();
if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID']) == '')) {
        echo ("You are not logged in, please <a href=\"login.php\">login</a> or <a href=\"register.php\">register</a>.");
        exit;
}
print "
E-mail:<?php echo "$_GET['email]";?><br \>
Birthdate:<?php echo "$_GET['birthdate]";?><br \>
country:<?php echo "$_GET['country]";?><br \>
";
?>
</th>
</table>


I don't use any software like joomla on that direction there is just running a small login/register system.

, Thanks
Nemesis234
Code:
<div class="r-menu">
<div class="r-menuhead">Account</div>
<table width="125px">
<th align="left">
<?php
   session_start();
if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID']) == ''))
   {
        print "You are not logged in, please <a href=login.php>login</a> or <a href=register.php>register</a>.";
        exit;
   }

        print "Username: $_GET['username']<br \>";
?>
</div>
</th>
</table>
<div class="r-menuhead">Profile</div>
<table width="125px">
<th align="left">
<?php
   session_start();
if(!isset($_SESSION['SESS_MEMBER_ID']) || (trim($_SESSION['SESS_MEMBER_ID']) == '')) {
        print "You are not logged in, please <a href=login.php>login</a> or <a href=register.php>register</a>.";
        exit;
}
print "
E-mail: $_GET['email]<br \>
Birthdate: $_GET['birthdate]<br \>
country: $_GET['country]<br \>
";
?>
</th>
</table>


not at my proper computer, but this should work a little bit better then yours.

you dont need to re-open php once its opened to be able to print out variables.

and this is most definatly NOT a virus, and anyone who tells you it is doesnt have a clue
sonam
You have lot of mistakes in this code. First you MUST start session on the top of page. If you have any html tag or just one space before session_start function sessions will fails.

Second, it is enough to call session_start only once on page not every time when you want to use some session.

Third, you cannot put <?php inside other <?php tag. Try to develop something simple on beginning because login system need lot of protections and good PHP and MySql knowledge.

Sonam
imagefree
replace

Code:
echo ("Username: <?php echo "$_GET['username]";?><br \>");


with

Code:
echo ("Username: {$_GET['username]}<br \>");
rjraaz
your code has lots of error when i have removed above error it gives next new error please just check your code throughly.
Related topics
PHP/Blogger error
Need help with php script
Impossible parse error!
Trouble figuring out a parse error
Parse error: syntax error, unexpected '{' in /home/frih/publ
Php parsing error! Need help
php error ?[parse error]
Parse error - need help
Link Add Error
Need help with an error
error
Photoshop--feedback~~new website
Parse error: syntax error, unexpected T_NEW
If you know website design, check this....
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.