Here is a neat thing, How to create your own web based personal notepad, First, Create a new directory on your site named notepad. Inside of it make a new file named index.php, Paste the following code:
<?php
if($_POST['save']) {
$newmsg = stripslashes($_POST['message']);
$file = fopen("notes.txt","r+");
ftruncate($file,0);
$writedate = fwrite($file,$newmsg);
fclose($file);
}
$messages = fopen("notes.txt","r+");
$message = fread($messages,100000);
fclose($messages);
?>
<form action="<? $php_self ?>" method="post">
<input type="submit" name="save" value="Save Notes" /><br />
<textarea name="message" rows="50" cols="100"><?=$message?>
</textarea>
<br />
<input type="submit" name="save" value="Save Notes" />
</form>
One more step, You need to have a file for storing notes... name a new file named notes.txt leave it blank and save... Upload it to your server and test!
(PS: CHMOD notes.txt --> 777 so it can be written to.)
discuss this topic to forum
