mardi 28 juin 2016

Why does this PHP line of code cause a syntax error on my webhosting, but not on c9?

It is a line of code where the text area should be blank if there is no SESSION. If there is a SESSION, put the contents into the textarea. Is there really an error here, or is it just the webhosting's problem?

<form id="translateform" action="processTranslation.php" method="post"><?php 
echo "<textarea maxlength='3000' id='inputField' placeholder='Enter your Lorem Ipsum text here:' name='translate'>";
if(isset($_SESSION['text'])){
    echo $_SESSION['text'];
    }
    echo "</textarea>";
        ?>

Error message: "Uncaught SyntaxError: Unexpected Identifier".

Aucun commentaire:

Enregistrer un commentaire