Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6152903
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:00:01+00:00 2026-05-23T20:00:01+00:00

i have this error Parse error: syntax error, unexpected ‘{‘ in receive/register.php on line

  • 0

i have this error

Parse error: syntax error, unexpected '{' in receive/register.php on line 1

My receive/register.php is

<?php
$_POST['username'] = $username;
$_POST['password1'] = $password;
$_POST['password2'] = $passwordagain;
$_POST['email'] = $email;

echo $username.'<br>'.$password.'<br>'.$passwordagain.'<br>'.$email;

if (!isset($username) || !isset($password) || !isset($passwordagain) || !isset($email))
{   /*
$_SESSION['regerrorid'] = '0';
$_SESSION['regerrormsg'] = 'Not all fields are completed';
header ('Location: ./'.$directory.'register');*/
echo'uhm';
}
?>

And the one that sends the info is

<?php
/* !!!!only if the code works
$_SESSION['regerrorid'] = $success;
$_SESSION['regerrormsg'] = $message;
*/
?>
<div class='registration-<?php echo $success; ?>'><?php echo $message; ?></div><br>
<form action="receive/register.php" method="POST">
  <span style='font-size:14px;font-family:"Lucida Console", Monaco, monospace'>Username:</span><input class='lolquired' type="text" name="username" /><br />
  <span style='font-size:14px;font-family:"Lucida Console", Monaco, monospace'>Password:</span><input class='lolquired' type="password" name="password1" /><br />
  <span style='margin-left:-56px;font-size:14px;font-family:"Lucida Console", Monaco, monospace'>Repeat Password:</span><input class='lolquired' type="password" name="password2" /><br />
  <span style='margin-left:24px;font-size:14px;font-family:"Lucida Console", Monaco, monospace'>Email:</span><input class='lolquired' type="email" name="email" /><br /><br />
  <input class="button" type="submit" value="Submit" />
</form><?php 
/* !!!!only if the code works
$_SESSION['regerrorid'] = '';
$_SESSION['regerrormsg'] = '';
*/
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:00:01+00:00Added an answer on May 23, 2026 at 8:00 pm

    shouldn’t it be:

    $username = $_POST['username'];
    $password = $_POST['password'];
    

    etc….

    When I used your code I got $username is undefined error on php 5.3.5

    also noticed… if you’re using $_SESSION you need to add

    session_start();
    

    at the top of your code

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this error: Parse error: syntax error, unexpected $end in /...../student.php on line
I am getting this error : Parse error: syntax error, unexpected T_OBJECT_OPERATOR in wp-content/themes/phil/page.php
I am getting this error: Parse error: syntax error, unexpected T_SL on line 23
I get this error:- You have an error in your SQL syntax; check the
I'm getting the below error on my server: Parse error: syntax error, unexpected T_STRING,
I have got this error when using Enterprise Library 3.1 May 2007 version. We
I have been trying to get around this error for a day now and
NHibernate is driving me 'Nuts'!!! I have the following mapping. Which returns this error
I have limited experience with .net. My app throws an error this.dateTimeFormat is undefined
I have a list of error codes I need to reference, kinda like this:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.