<?php if(isset($_SESSION['loggedin'])){
echo '<form action="postForm.php" method="post">
<TextArea name="microBlog" id="microBlog" cols="30" rows="10">
</TextArea>
</br>
<input type="submit">
</form>';
}
?>
There is difference between backtick
and single quotes
.
A string literal can be specified in four different ways:
Single quoted strings will display things almost completely "as is." Variables and most escape sequences will not be interpreted. The exception is that to display a literal single quote, you can escape it with a back slash \', and to display a back slash, you can escape it with another backslash \ (So yes, even single quoted strings are parsed).
Double quoted : If the string is enclosed in double-quotes ("), PHP will interpret the following escape sequences for special characters:
Heredoc : A third way to delimit strings is the heredoc syntax: <<<. After this operator, an identifier is provided, then a newline. The string itself follows, and then the same identifier again to close the quotation.
Nowdocs are to single-quoted strings what heredocs are to double-quoted strings. A nowdoc is specified similarly to a heredoc, but no parsing is done inside a nowdoc. The construct is ideal for embedding PHP code or other large blocks of text without the need for escaping. It shares some features in common with the SGML construct, in that it declares a block of text which is not for parsing.
For more info, click Strings