Code:

$result = mysqli_query($db, "SELECT id FROM accounts WHERE login = '$login'"); $array = mysqli_fetch_array($result); $end = $array['id']; $error = mysqli_error($db); echo($error $end); mysqli_close($db); exit(); 

Mistake:

 syntax error, unexpected '$end' (T_VARIABLE) in /var/www/html/LHVideo/Auth/auth.php on line 15 

Tell me how to fix

    2 answers 2

    You must separate the parameters passed to echo() :

     echo($arg1, $arg2); 

    Or so

     echo $arg1, $arg2; 

      The echo () function takes one or more arguments that are separated by a comma.

       echo ( string $arg1 [, string $... ] ) 

      You need to fix echo($error $end); echo($error, $end);