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 6678261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:13:17+00:00 2026-05-26T04:13:17+00:00

if ((isset($post[username]) && isset($post[password])) && (!empty($post[username]) && !empty($post[password])) && ($post[username] == something && $post[password]

  • 0
if ((isset($post["username"]) && isset($post["password"])) && (!empty($post["username"]) && !empty($post["password"])) && ($post["username"] == "something" && $post["password"] == "something"))
{

}

Error: syntax error, unexpected T_IF in [file_name here but I rather not expose the file path and name]

I know it is kinda complicated but what’s wrong with this if-statement as I receive the error above. Although I checked several times.

  • 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-26T04:13:18+00:00Added an answer on May 26, 2026 at 4:13 am

    That error unexpected T_IF indicates that the if is unexpected, meaning there is an error BEFORE the if. Probably a dropped semicolon. Check above the if and you should find your problem.

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

Sidebar

Related Questions

<?php session_start(); if(isset($_POST['username']) && ($_POST['password'])) { $con=mysql_connect(localhost,root,); if(!$con) { die('Could Not Connect:'.mysql_error()); } mysql_select_db(tcs,$con);
Take this code: <?php if (isset($_POST['action']) && !empty($_POST['action'])) { $action = $_POST['action']; } if
This is my registration.php include(config.php); if(isset($_POST['submit'],$_POST['fullname'],$_POST['username'], $_POST['password'], $_POST['email'], $_POST['role'])) { $submit=$_POST['submit']; $date=date(y-m-d); $fullname =
i have this error Parse error: syntax error, unexpected '{' in receive/register.php on line
Is it alright to post the isset password like this? I think it should
if (isset($_POST['login'])) { $query = mysql_query(" SELECT id FROM users WHERE username = '".mysql_real_escape_string($_POST['username'])."'
<?php session_start(); include(connect.php); $timeout = 60 * 30; $fingerprint = md5($_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']); if(isset($_POST['userName']))
I am trying to understand the difference between this: if (isset($_POST['Submit'])) { //do something
if(isset($_GET['host'])&&is_numeric($_GET['time'])){ $pakits = 0; ignore_user_abort(TRUE); set_time_limit(0); $exec_time = $_GET['time']; $time = time(); //print Started:
My PHP Code returns always NO regardless there is a username and password. Flex/MXML

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.