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

  • SEARCH
  • Home
  • 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 7824361
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:34:18+00:00 2026-06-02T08:34:18+00:00

Normally the T_String error is when there is an extra quote, or atleast I

  • 0

Normally the T_String error is when there is an extra quote, or atleast I thought. Tonight I got this error

Parse error: syntax error, unexpected T_STRING in /var/www/html/registerBackend.php on line 118

and here is the code for line 118+119

$query = "INSERT INTO User (Name,Email,Password,Port) VALUES ('$name', '$email','$password','$port')";
mysql_query($query) or die('Error, insert query failed');

Here is some more code if it helps

 $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');

 $dbname ='hidden';
mysql_select_db($dbname);

//Check if Username has been used before
$query = "SELECT * FROM User where Name='$name'";
$result=mysql_query($query) or die('Error, insert query failed');
$countName=mysql_num_rows($result);

//Check if email has been used before
$query = "SELECT * FROM User where Email='$email'";
$result=mysql_query($query) or die('Error, insert query failed');
$countEmail=mysql_num_rows($result);

if($countName < 1 && $countEmail < 1){

//Assign their port number
$query  = "SELECT *  FROM login;
$countPort=mysql_num_rows($result);
$port = 20000 + $countPort;


$query = "INSERT INTO User (Name,Email,Password,Port) VALUES ('$name', '$email','$password','$port')";
mysql_query($query) or die('Error, insert query failed');


$query  = "SELECT username, password FROM login WHERE username = '$username' AND password = '$password'";
$result = mysql_query($query);

print "<center><div id=newAREA>You have been signed up!<br>";
while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
  echo "Minecraft Username:{$row['Name']} <br>" .
       "Email:{$row['Email']} <br>" .
       "Password:{$row['Password']} <br>".
       "Port:{$row['Port']} <br>";

}
} elseif ($countName > 1) {
print "Someone has already used this Minecraft IGN! E-mail Stolen@freeminecrafthost.com   to prove it is yours!";
} elseif ($countEmail > 1) {
print "Email has been used before!";
}
  • 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-06-02T08:34:19+00:00Added an answer on June 2, 2026 at 8:34 am

    On line:

    $query  = "SELECT *  FROM login;
    

    you need to have:

    $query  = "SELECT *  FROM login";
    

    But definitely need to give those queries some lovin, too.

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

Sidebar

Related Questions

Is there a way to speed up PostgreSQL's createdb command? Normally I wouldn't care,
Normally I'm pretty competent with CSS but I just can't figure this one out...
I normally use this function to sanitize my form inputs before storing them into
I just read this answer Converting upper-case string into title-case using Ruby . There
Is there a way to universally force a page to error when a usercontrol
I finally found the problem, but there is no way this is making sense,
Is it possible, if one has a javascript variable like this: var myVariable =
I normally just @Autowire things into spring objects. But I've encountered a situation where
I normally have several problems with how cron executes scripts as they normally don't
Normally I would just use URL GET parameters but CodeIgniter doesn't seem to like

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.