Problem in registration.

Help, I have a problem: I am writing a syntax error. Here is what he writes:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in Z:\home\php\www\index.php on line 29.

And here is where the alleged error

 if (isset($_COOKIE['login'])). 

Updated from the comment .

 <?php if (!isset($myrow['avatar']) or $myrow['avatar']=='') { print <<<HERE <form action="testreg.php" method="post"> <p> <label>Ваш логин:<br></label> <input name="login" type="text" size="15" maxlength="15" HERE; if (isset($_COOKIE['login'])) { echo ' value="'.$_COOKIE['login'].'">'; } print <<<HERE </p> <p> 

Who knows, help, it is very necessary.

  • one
    Syntax error, lay out a piece of code, and if (isset ($ _ COOKIE ['login'])) is written correctly! - LordySL
  • Show the query to the database, I think the error is there. - Deonis
  • Moved to the question. - Anton

1 answer 1

Is this content taken from the site? And so he knew that here heredoc ))

The whole problem is

 print <<<HERE бла бла бла HERE; 

Remember two things about this:

  1. After

     print <<<HERE 

    there should be NO ANYTHING on the same line, no signs, numbers, letters, spaces, just a transition to a new line.

  2. Closing tag HERE; MUST begin with the very beginning of the line. Just after it, nothing should be! Only the transition to a new line.

In general, all spaces, characters, tags before and after print <<<HERE should be removed, as well as all spaces, characters, tags before and after HERE; must be removed. And I advise you to read here .

  • Excuse me. Last question> Parse error: syntax error, unexpected '<' in Z: \ home \ php \ www \ index.php on line 23 This is what is highlighted. - Anton
  • @ Anton need a code. Check next to print <<< HERE and HERE; there were no spaces anywhere. 100 times check maybe somewhere missed. - LordySL
  • @ Anton Put the daw for the best!) - LordySL