Re: apply css font face to post command
| From: | Richard | Date: | Wed, 23 Aug 2023 11:42:46 +0000 |
| Subject: | Re: apply css font face to post command | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-328262@lists.php.net to get a copy of this message | ||
> From: e-letter <inpost@gmail.com>
> Sent: August 23, 2023 10:17:40 AM UTC
> On 18/08/2023, JEFFRY KILLEN <jekillen@prodigy.net> wrote:
>> I noticed a syntax error in the code I sent:
>
>>>> if($_POST['text']) { print "<p class'(css class def goes
>>>> here)'>"$_POST['text']"</p>"}
>> should be
>>>> if($_POST['text']) { print "<p class'(css class def goes
>>>> here)'>" . $_POST['text'] . "</p>"}
>>
>> I left out the . (string concatination dot)
>>>> Result was blank html web page.
> Repeat failure occurs both with(out) space
> character between full stop character.
You need to turn on php debugging/errors (and also look at the server error log) so you can see
what's happening. Simply reporting that you are getting a blank page tells very little (except
that you have some type of error).
Separately, directly displaying unsanitized user input is very dangerous. Always sanitize user input
as part of handling and before displaying it back out to a user.