Over the last few months several people have asked me how to create a cgi script that uses a database and then prints out the results.
Often they're just looking for an example rather than a full blown explination. So here one is http://leo.cuckoo.org/projects/cgi_db_tt_example/
Still need to write up YAPC::E! Patches / comments welcome, though it's not mean't to be perfect, it's just mean't to get people going.
Re:Hmm...problems.
Ranguard on 2002-09-26T15:14:04
Bad Leo, naught leo, no pie!!!!Some updates made, will look at rest soon, my brain has just decided to start thumping and turned to a pile of goo at the same time
:( others
- Could use DBI plugin but didn't want to as I don't agree with it in the Template unless it's a quick hack.
- Guess so, but I'll leave it for now as I consider it just for debuging, though I guess a dodgy bit of user data could do something odd later.
Re:Hmm...problems.
2shortplanks on 2002-09-26T15:27:26
2. Guess so, but I'll leave it for now as I consider it just for debuging, though I guess a dodgy bit of user data could do something odd later.
Yeah, you're leaving yourself open somewhat to a cross site scripting attack. Best to use an error template (if you're going to print out anything to the browser) and do a [% error.info | html %]