Wrote this for a guy on Hackforums, thought I'd share it here as well. Let me know of any bugs / issues. Planning on adding some security to it with a login system if I get the time and people want it.
Here is the table, and the coding. All you have to do is set config.php to be connected to your database.
Code:
CREATE TABLE `notepad` (
`id` int(1) NOT NULL,
`text` varchar(500) NOT NULL,
`time` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Then find the little SQL window, and run the following query:
Code:
INSERT INTO `notepad` (`id`, `text`, `time`) VALUES
(1, 'This is your personal notepad! 500 character limit!', '2010-09-12 12:02:12')
And the action, update.php is below. On update.php, update the "$update" query with your database name where it says `database_name`.`notepad`. Here is the code: