Buongiorno a tutti,
Cerco di spiegarmi il meglio possibile.
Ho una pagina pippo.html, quello sotto e' un esempio a caso.
<!DOCTYPE HTML>
<html>
<head>
<title>FatturaPromo</title>
<meta charset=\"utf-8\">
<form action="scrivi.php" method="POST" name="form">
<input type=text name=ragionesociale value=Ragione Sociale size=10 maxlength=10 />
<input type="submit" value="Invia dati"
</html>
</head>
che devo trasformarla in pippo.txt.
Per farlo ho usato questo metodo:
<?php
$stringa1="<!DOCTYPE HTML>";
$stringa2="<html>";
$stringa3="<head>";
$stringa4="<title>FatturaPromoxtech</title>";
$stringa5="<meta charset=\"utf-8\">";
$stringa6="<input type=\"text\" name=\"ragionesociale\" value=\"\" size=\"10\"maxlength=\"10\" />";
$stringa7="</html>";
$stringa8="</head>";
$file=fopen("file.txt","w");
fputs($file,$stringa1."\n");
fputs($file,$stringa2."\n");
fputs($file,$stringa3."\n");
fputs($file,$stringa4."\n");
fputs($file,$stringa5."\n");
fputs($file,$stringa6."\n");
fputs($file,$stringa7."\n");
fputs($file,$stringa8."\n");
fclose($file);
?>
Facendo cosi , mi ritrovo un codice uguale identico in .txt pero' con il campo Input type vuoto cioe' il "Value"
La mia domanda e', invece di trovarmi in txt value=\"\" dell'input type, mettere quello che ho scritto nel Form? cioe' value=\"sale a tutti\"
Grazie in anticipo a tutti.