I think you need to open the file in append mode. See if this works.
PHP Code: 
                       $string = '<?php  
$l13 
"'. $_POST["l13"]. '"

?>'; 
  
$fp = FOPEN("config.php", "a"); 
FWRITE($fp, $string); 
FCLOSE($fp); 
  

  
?> 
  
<form action="" method="post" name="install" id="install"> 
  <p> 
    <input name="l13" type="text" id="l13" value="">  
    l13 text 
</p> 
   <p> 
    <input type="submit" name="Submit" value="Install"> 
  </p> 
</form>
EDIT: I just replaced 'w' with 'a'
I am just guessing. I have no idea if php has an append mode.