Hi, I've problem with user login validation. This is my code: } else { // submitted // initialize array to hold validation errors $errorList = array(); // check if required input is present if (!isset($_POST['username']) || trim($_POST['username']) == "") { $errorList[] = "ERROR: Missing value username"; } // check if input is of correct length if (strlen($_POST['password']) < 6) { $errorList[] = "ERROR: Incorrect length for value password"; } // check if username is alphanumeric if (preg_match("/^[a-z0-9]*$/i", $_POST['username']) { // LINE 109 $errorList[] = "ERROR: Username must be alphanumeric"; } // check to see if any validation errors occurred if (sizeof($errorList) > 0) { // if errors occurred // display error list // and terminate script processing echo "Please review and correct the following errors: <br />"; foreach ($errorList as $e) { echo "$e <br />"; } } else { // and so on } } PHP: I got error code: Parse error: syntax error, unexpected '{' in **\sidebar.php on line 109 can you help me?
I have attached my sidebar and also the line 109. It is located in // check if username is alphanumeric if (preg_match("/^[a-z0-9]*$/i", $_POST['username']) { // LINE 109 PHP: