Hello,
I'm trying to learn PHP using netbeans although I've come up against a problem with the interpreter and I can't tell how to fix it.
It's to do with the notation <<<_END. It should, from what I'm learning wrap everything into a variable until it's ended with _END
However, if I plug in the following example:
<?php
echo <<<_END
<html><head><title>PHP form upload</title></head><body><form method='post' action='upload.php' enctype='multipart/form-data'>
Select File: <input type='file' name='filename' size='10' />
<input type='submit' value='Upload'/>
</form>
_END
if ($_FILES)
{
$name = $_FILES ['filename']['name'];
move_uploaded_file($_FILES ['filename'][tmp_none], $name);
echo "Uploaded image '$name' <br/> <img src='$name'/>";
}
echo "</body></html>";
?>
I get the following error message
Parse error: syntax error, unexpected T_SL in script.php on line 13, where line 13 is the code that says 'echo <<<_END'.
Can anyone help me, please?