Discussion:
PHP tutorial
Martin Christian
2013-11-24 20:39:01 UTC
Permalink
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ashley Sheridan
2013-11-24 20:50:57 UTC
Permalink
Post by Martin Christian
Hi,
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Martin Christian
2013-11-24 22:39:28 UTC
Permalink
Thanks for all the feedback. :-) I'll include your feedback as soon as I
find time (probably next weekend).

Regards,

Martin
Post by Ashley Sheridan
Post by Martin Christian
Hi,
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
!($_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. :)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Continue reading on narkive:
Loading...