Tutorial ideas wanted
Please post a list of ideas for tutorials that can be written for the php section. Please bear in mind the tutorials are to be kept relatively small so don't ask for something that may take pages upon pages of text to explain. Thanks.
cwarn23
Occupation: Genius
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
OK, here are some of the problems I see most often:
login/registration
post handling for multiple checkboxes with same 'name' attribute
how to use header redirect!
emailing (with an attachment)
working with dates (subtracting and adding days etc) to get new dates
use of regex in preg_* functions - users often don't realise that these are the functions that they require
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
One that comes up a lot, is two dropdowns with linked info (although it involves javascript). I was planning on writing one, but still haven't. I do have a working example though. If you want it I can zip it (uses PHP, MySQL and jQuery).
One thing popping up in the forum lately, is how to handle notices for undefined indexes and variables (using the isset construct). A sticky for that to refer to would be nice as well.
pritaeas
Posting Expert
5,483 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
I've just submitted a redirect tutorial and am waiting for staff writers to approve. Soon I'll have dinner and start on the next tutorial.
cwarn23
Occupation: Genius
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259
Just remembered another one:
when using a loop, many users do a query on every iteration, whereas they could just build up a values or where clause and send just the one query at the end of the loop. I've answered a few of these lately.
//edit
perhaps something on general security, e.g.
preventing sql injection,
XSS,
sessions,
location of include/config files etc
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080