What I have is the whatitis.php which is the form
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<body>
<?php
require("var.php");
echo $Mypath;
$script = eregi("([^\\\/\/]+)\.php",$_SERVER['PHP_SELF'],$regs);
$txt = $regs[1].'.txt';
$fullPath = $MyPath . $txt;
$display1 = file($fullPath);
$displaytext1 = implode("", $display1);
$displaytext1 = stripslashes($displaytext1);
$action = $regs[1].'2.php';
$thetitle = ${ $regs[1] . 'title' };
$thedesc = ${ $regs[1] . 'desc' };
$thename = ${ $regs[1] . 'name' };
echo "<form action=\"$action\" method=\"post\" target=\"main\">";
?>
<CENTER>
<P ALIGN=CENTER>
<TABLE WIDTH="600" bordercolor="black" CELLPADDING="0" CELLSPACING="0" BORDER="0">
<TR>
<TD style="border-bottom-style: solid; border-bottom-width:1"
style="border-right-style: solid; border-right-width: 1" style="border-top-style: solid; border-top-width:1"
style="border-left-style: solid; border-left-width: 1" WIDTH="100%" BGCOLOR="#F1F1F1" VALIGN=center>
<?php echo $thetitle; ?> <?php echo $thedesc; ?></TD>
</TR>
<TR>
<TD WIDTH="100%" VALIGN=TOP><p>
<textarea name=<?php echo $thename; ?> cols="75" rows="1" wrap><?php echo $displaytext1; ?></textarea>
</p></TD>
</TR>
</TABLE>
<p>
<input type="submit" name="Submit" value="Save Changes">
</p>
</form>
</body></html>
and I have the whatitis2.php, which puts the form into a txt file.
<html><title></title><head><LINK HREF="../css/rwb.css" REL="STYLESHEET"></head><body>
<?php
require("var.php");
echo $Mypath;
$filename1 = $MyPath . 'whatitis.txt';
$textbox = $_POST["whatitis"];
$content1 = stripslashes($textbox);
if (is_writable($filename1)) {
if (!$handle = fopen($filename1, 'w')) {
print "<center>Cannot open file ($filename1)</center>";
exit;
}
if (!fwrite($handle, stripslashes($content1 ))) {
print "<center>Cannot write to file ($filename1)</center>";
exit;
}
print "<center>Success ($filename1) has been updated.</center>";?><br><?
fclose($handle);
} else {
print "<center>The file $filename1 is not writable</center>";?><br><?
}
//END OF FILE 1
echo '<CENTER><P ALIGN=CENTER><br><br>
<TABLE BORDERCOLOR="BLACK" WIDTH="400" CELLPADDING="15" CELLSPACING="0" BORDER="0">
<TR>
<TD style="border-bottom-style: solid; border-bottom-width:1" style="border-right-style: solid; border-right-width: 1"
style="border-top-style: solid; border-top-width:1" style="border-left-style: solid; border-left-width: 1" WIDTH="100%"
BGCOLOR="#F1F1F1" VALIGN=TOP><CENTER><P ALIGN=CENTER><B><FONT SIZE="3">
You have successfully changed the file</FONT></B><BR><B><FONT SIZE="3"></FONT></B><BR>
<FONT SIZE="3"><a href="../ourhome.html" target="main">Click here to go back.</a></FONT>
</TD>
</TR>
</TABLE>';
?><br>
</body></html>
These files work beautifully together, but I want to take these files, and make a header, body, intro, header 2, body 2, etc.... and name the files accordingly, ie.....into.php, and intro2.php, and so forth. In doing that, I should change the name of the text box, no? I noticed it has the name whatitis, so I figured if I copy and paste that into intro.php then it should have the name "intro", or doesnt it need to...can I just simply name it something generic, like textbox?? or something.?