07-15-2004, 12:05 AM
| THREAD STARTER
#1 (permalink)
|
| New Member Join Date: Jul 2004
Posts: 2
| PHP Variable Dispatch[Help] 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: PHP Code: <?php
$file = $_POST["filename"];
$name = $_POST["name"];
$date = $_POST["date"];
$content = $_POST["content"];
????: NamePros.com http://www.namepros.com/programming/38863-php-variable-dispatch-help.html $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? ????: NamePros.com http://www.namepros.com/showthread.php?t=38863
?
__________________ -Immortal-
Last edited by Immortal; 07-15-2004 at 12:14 AM.
|
| |