A couple of days ago, I received a request for a PHP demonstration in which the web site owner could enter a character's name in a game, and something about the character, and have that information stored as a web page for later reference under the character's name.
It's easy enough to write a basic program - in fact I have written one and put the source
here. Security is quite another matter, as it's also very easy to write such an application that will leave you open to injection attacks and all sorts of nasties (which is why my example checks our Well House Consultants staff cookie, so that we can update the page but you can't, Mr Joe Public).
There are also the questions like "how do I edit the data, then" and "How do I attach an image", "How do I delete a card", "How do I sort and search" .... none of which I was asked ;-) ...
They're all perfectly do-able, and in fact we cover such things on our
PHP Programming course and our
PHP Techniques Workshop which I'm looking forward to running again in the new year.
Further links -
Data Entry page (locked down, I'm afraid!) and
Card Index.
Note - if you keep data about real people (or perhaps even the characters that they play in a game) on a system like this, and especially if it's public facing, you need to be aware of legal issues such as the UK's Data Protection Act.
(written 2008-12-27)
Associated topics are indexed under
H310 - PHP - Putting it all together [3454] Your PHP website - how to factor and refactor to reduce growing pains - (2011-09-24)
[2931] Syncronise - software, trains, and buses. Please! - (2010-08-22)
[2635] A PHP example that lets your users edit content without HTML knowledge - (2010-02-14)
[2275] Debugging multipage (session based) PHP applications - (2009-07-09)
[1840] Validating Credit Card Numbers - (2008-10-14)
[1794] Refactoring - a PHP demo becomes a production page - (2008-09-12)
[1754] Upgrade from PHP 4 to PHP 5 - the TRY issue - (2008-08-15)
[1716] Larger applications in PHP - (2008-07-22)
[687] Presentation, Business and Persistence layers in Perl and PHP - (2006-04-17)
[468] Stand alone PHP programs - (2005-10-18)
Some other Articles
Background to the TransWilts Train FiascoHow much does a train service actually costWhy hasnt the fiasco been put rightBest source to learn Java (or Perl or PHP or Python)Index Card System for Game Characters in PHPMaking our things easier to findChristmas Survivors-PHP - Parse error: syntax error, unexpected $end ...Why are cooks bad tempered?