Htmllearner5
02-01-2007, 09:37 PM
I used:
<html>
<head>
</head>
<body>
<form action="andrestats.php" method="post">
<input type="text" name="subandrestatsta" />
<input type="submit" value="Submit" />
</form>
</body>
</html>
to submit the data. And this:
<?php
$stats = $_POST['andrestatsta'];
$myFile = "andre.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "$stats";
fwrite($fh, $stats);
fclose($fh);
?>
To print the data to the text file...it doesnt work!
<html>
<head>
</head>
<body>
<form action="andrestats.php" method="post">
<input type="text" name="subandrestatsta" />
<input type="submit" value="Submit" />
</form>
</body>
</html>
to submit the data. And this:
<?php
$stats = $_POST['andrestatsta'];
$myFile = "andre.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "$stats";
fwrite($fh, $stats);
fclose($fh);
?>
To print the data to the text file...it doesnt work!