troubleshooting Question

PHP 7.4.0 and Parsing Error

Avatar of dogsareit
dogsareitFlag for United States of America asked on
PHP
13 Comments1 Solution17 ViewsLast Modified:
I am using PHP 7.4.0 and I keep receiving this parsing error.
I can not see what the problem is with the line the parser is complaining about.
It does not like the  the first echo statement.
This is the error:
This is the coding:
// TEST SQL SEVER CONNECTION

    $sname = $_SESSION['servername'];
   
    $testconnect  = array('UID'=>$_SESSION['uid'],
                      'PWD'=>$_SESSION['pwd'],
                      'Database'=>$_SESSION['DB']);
                 
    $testconn = sqlsrv_connect($sname,$testconnect);
   
    if(!$testconn)
   {  
        echo '<BR>CONNECTION TEST FAILED TO SQL SERVER';
        echo '<BR>ABORTING APPLICATION AND EXITING' ;
        die(print_r(sqlsrv_errors(), true));
        sqlsrv_close($testconn);
        session_destroy();
        EXIT;
    }else{
        echo '<BR>CONNECTION TEST SUCCEED TO SQL SERVER';
        echo '<BR>CONTINUING WITH APPLICATION';
    }
// END OF TESTING SQL CONNECTION


Could someone take a look and see what is wrong
Thank you in advance

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 13 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros