Re: PHP tutorial
| From: | Ashley Sheridan | Date: | Sun, 24 Nov 2013 20:50:57 +0000 |
| Subject: | Re: PHP tutorial | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-322496@lists.php.net to get a copy of this message | ||
On Sun, 2013-11-24 at 21:39 +0100, Martin Christian wrote:
> Hi,
>
> I've written a PHP DB/Template tutorial at:
>
> http://christianix.de/php-tutor/index.html
>
> I hope it will be useful to someone.
>
> Regards,
>
> Martin
>
It looks good, but there are a couple of things I would amend.
You use this construct to check for POST data, but it will actually
throw warnings if no POST data is sent:
!($_POST["name"] && $_POST["email"] && $_POST["bear"])
In this case you should use the isset() function.
In step 7 you're using POST variables directly as part of your mail()
call without any kind of validation, so you're essentially opening it up
to becoming a spam relay script.
Aside from that, looks good, and you've got plenty of detail in there to
explain what you're doing. :)
--
Thanks,
Ash
http://www.ashleysheridan.co.uk