PHP Variable Dispatch[Help]

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

Immortal

New Member
Impact
0
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:
<?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:
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
sorry you need to explain your question a bit better
 
0
Close
DomainEasy: white label portfolios are live. Enable yours.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Filters for activity feeds
Your news feed, Latest activity, and the activity tab on profiles now have filter buttons: All, Posts, Quick replies, and Other. Your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back