<form>
<html>
<table>
<tr><td><input type="text" value="value1"></td><td><input type="text" value="content1"></td><td><input type="text" value="first commment "></td></tr>
<tr><td><input type="text" value="value2"></td><td><input type="text" value="content2"></td><td><input type="text" value="seccond comment"></td></tr>
<tr><td><input type="text" value="value3"></td><td><input type="text" value="content3"></td><td><input type="text" value="third comment"></td></tr>
</table>
Add more:
<table>
<tr><td><input type="text" value=""></td><td><input type="text" value=""></tr>

</table>
<input type=submit value="Add Row">

<td>
<tr><td><tr><td>


<p>


<?php

$fn = "sale.txt";
$fn2 ="sale.php";

if (isset($_POST['content']))

{

    $content = stripslashes($_POST['content']);

    $fp = fopen($fn,"w") or die ("Error opening file in write mode!");

    fputs($fp,$content);

    fclose($fp) or die ("Error closing file!");


    $content = stripslashes($_POST['content']);

    $fp = fopen($fn2,"w") or die ("Error opening file in write mode!");

fputs($fp,"

<?php 
$"."sale=array(

");

    fputs($fp,$content);

fputs($fp,"

);?>

");

    fclose($fp) or die ("Error closing file!");

}

?>



<form action="<?php echo $_SERVER["PHP_SELF"] ?>" method="post">

    <textarea rows="25" cols="40" name="content"><?php readfile($fn); ?></textarea>

    <input type="submit" value="Sauver"> 

</form>


