FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free 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
Related topics
can i help?
help,Bonding
HELP!!
Help me with MySQL Account Maintenance and phpBB 2.0.15 :((
help, change pass my acc in cpanel
help me upgrade php to 5.
Need help adding a domain
help add admin in phpbb forum
How to solve this problem? Thanks
Help!
Help me change port for phptriad
problam Plz help
Help!!
Google Ads help fund Spyware ?
simple php problem, please help...
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

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