To update stock.htm by stock.php
<? if (strlen($_POST['data']) > 10) { echo $_POST['data']; } else { $ar=file("stock.htm"); for ($i=0;$i<count($ar);$i++) { echo $ar[$i]; } } ?>
Save "; $d = $_POST['data']; $f = fopen("stock.htm","w"); fputs($f,"$d"); fclose($f); echo " : ok
"; echo "
Back
"; } ?>