FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Help

 


NG
hey i want to edit a txt file on my site when some one goes to the admin panel on my site can some one tell me howto please?
DanielXP
Code:
<?php


echo "<form method=post action=notepad.php?action=edit><textarea cols=60 rows=20 name=edit>";
$file = "TEXTFILE.txt";
$fh = fopen($file, 'r');
$theData = fread($fh, filesize($file));
echo $theData;
fclose($fh);
echo "</textarea><br><input type=submit value=Update></form>";
if($_GET['action'] == 'edit')
{
$fh = fopen($file, 'w') or die("can't open file");


$stringData = $_POST['edit'];
fwrite($fh,stripslashes($stringData));
fclose($fh);

}
echo "</center>";
?>
siena
NG wrote:
hey i want to edit a txt file on my site when some one goes to the admin panel on my site can some one tell me howto please?
from your web site or from your cpanel ?
DanielXP
siena wrote:
NG wrote:
hey i want to edit a txt file on my site when some one goes to the admin panel on my site can some one tell me howto please?
from your web site or from your cpanel ?


He said it will be for his admin panel so it will be for the site not cpanel
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.