nooty comments on their tutorials


profile / submitted / saved / comments / tutorial comments
RSS feed
EdRApril 12, 2008
view tutorial

This tutorial is a *BAD* idea and demonstrates shockingly bad design, ideas, and code practices. Not that bad PHP is a surprise, but the point stands. You show little skill with the language and obviously do not understand how the LAMP stack works.

You should *never* be using raw MySQL queries unless you know what you are doing; you obviously do not. You should always be using a wrapper to allow for formatted queries in the form of prepared statements, specifically with PDO ( http://php.net/pdo ) or MDB2 ( http://pear.php.net/MDB2 ).

If you *are* going to use raw MySQL queries, you need to be at least somewhat cognizant of failure. This code is ripe for SQL injection when used by a less-than-competent programmer; a function to neuter any data passed as a query string is essential. (You do not need such a function when using PDO or MDB2; when you pass the prepared statement a variable it automatically handles variable neutering.) Given a naive user of this code, I would expect them to simply pass the value of a $_GET entry into engine::fetchtemplate(), at which point I simply pass the literal shown below in as that GET value:

unimportant'; EMPTY templates; SELECT * FROM templates WHERE templatename = '

The above string would cause your query to empty your database. Something tells me that's not quite a good idea.

Furthermore, the entire idea behind your incredibly basic "system" is foolish. Unless you know why you are storing your *static pages* as database entries, you're doing it wrong. It isn't "easier to manage and edit"; that's preposterous when you have the option of tools with built-in SFTP controls. This is wankery for the sake of wankery and does not provide any substantial benefits.

(Oh, and a tip: this doesn't "separate code and design" at all.)

Learn to program and learn to think before writing "tutorials" that will be more likely to harm learning programmers than help them.

nootyApril 07, 2008
view tutorial

very good points indeed, but if you find your server going down then you need to be invseting in a better one! lol.

I prefer to use databases because it makes things for me easier to manage and edit. yes it has its flaws and drawbacks .. just like everything, but think abuot this - what if your server went down where your were storing all of yhour files?It's swings and rounderbouts really.

VashApril 06, 2008
view tutorial

Not to totally destroy the point of this tutorial but, what happens if your database software is on a different server from everything else, as is quite common these days? In short your site won't display if the database server goes down. Hence why it is best to store the templates in files. So at least your site and static resources will display even if your dynamic resources (data sent/received to/from the database) are not available. Probably quicker to use files too.

nootyJanuary 15, 2008
view tutorial

No - there are many justifiable reasons to remove a watermark
ie, it is your image and you have lost the PDF?
I Dugg this story and within minutes I had someone make a comment that they had a legitimate reason to remove a watermark for whatever reason and ended up paying someone to do do it as they didn't know how.

LizardSkinJanuary 14, 2008
moderator
view tutorial

You would only remove it to steal an image? no?

CleardetailsDecember 03, 2007
moderator
view tutorial

Simple but very clean, thanks!

nootySeptember 24, 2007
view tutorial

Thank you very much ;)

ever dyingSeptember 23, 2007
view tutorial

Pretty damn awesome! :P

nootyAugust 24, 2007
view tutorial

The tutorial is open to all and don't need to be logged in...

adobetutorialzAugust 24, 2007
view tutorial

need to login for view the final result :)