I’m setting up a simple way to amend text files on a server to be used within a site.
There are 3 text files at present I would like to be able to amend, but plan to increase this and just change the links as I go on.
I am using the code below from phptextedit.zip.
I have setup a simple HTML page which defines links to for each text file to amend and send a $file variable to the “form.php” script, but I cant get the $file variable to continue over to the 2nd php script “process.php” to update the text file for that variable.
Is there some way of keeping the $file variable available in memory or something to use in the “process.php” script on submit??
Can anyone help me with this??? I’m tearing my hair out!!!
Thanks in advance.
WEB PAGE HTML file is…
FORM.PHP script content is…<? print htmlspecialchars(implode("",file($file))); ?>
PROCESS.PHP script content is…<? $_GET['file'] $content = stripslashes($_POST['content']); $fs = fopen($file,"w") or die ("Error opening file!"); fputs($fs,$content); fclose($fs) or die ("Error closing file!"); echo ""; ?>