Alright well my PHP code is this:
here is the makefile.html:
<body>
<form method="post" action="finishfile.php">
<center>News Update</center>
File name: <input name="filename" type="text" size="49">
<br>
Name: <textarea name="name" type="text" size="30"></textarea>
<br>
Date: <textarea name="date" type="text" size="8"></textarea>
<br>
Content: <textarea name="content" type="text" size="50"></textarea>
<input type="submit" name="Submit" value="Submit">
</form>
</body>
and here is the finish file.php:
Alright, but when the files are written to the main.html file how can i make the variables be placed where i want them in the main.html file?
?
here is the makefile.html:
<body>
<form method="post" action="finishfile.php">
<center>News Update</center>
File name: <input name="filename" type="text" size="49">
<br>
Name: <textarea name="name" type="text" size="30"></textarea>
<br>
Date: <textarea name="date" type="text" size="8"></textarea>
<br>
Content: <textarea name="content" type="text" size="50"></textarea>
<input type="submit" name="Submit" value="Submit">
</form>
</body>
and here is the finish file.php:
PHP:
<?php
$file = $_POST["filename"];
$name = $_POST["name"];
$date = $_POST["date"];
$content = $_POST["content"];
$whole_string = '<br>' . '<br>' . $name . '<br>' . $date . '<br>' . $content;
$open = fopen($file, 'a');
fwrite($open, $whole_string);
fclose($open);
echo '<table width="100%" border="1" cellspacing="0" cellpadding="1">
<tr>
<td bgcolor="#CCCCCC">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><strong>INFORMATION</strong></font></div></td>
</tr>
<tr>
<td><font color="#00FF00" face="Verdana, Arial, Helvetica, sans-serif">FILE WAS MADE SUCCESSFULLY</font></td>
</tr>';
?>
Alright, but when the files are written to the main.html file how can i make the variables be placed where i want them in the main.html file?
?
Last edited:















