MeAmRussian
03-19-2006, 11:09 PM
Looks like I need help again :blush: I'm trying to make input fields which write the input to a file.
Here is what I have:
index.php
<form action="submit.php" method="POST">
<input type="text" name="question" size="20">
<input type="text" name="option1" size="20">
<input type="text" name="option2" size="20">
<input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></form>
submit.php
$outputstring = "Question: ".$question."<br>Options: ".$option1.", ".$option2."<br>=================================<br>";
$open = fopen("requests.htm", "a");
fwrite($open, $outputstring);
fclose($open);
?>
After trying out the script, the variables don't work for some reason. I get this for every input:
Question:
Options: ,
=================================
Why is the input not showing?
Also, every so often I have questions like these, but I really don't want to make a new thread each time. What should I do :confused:
Thanks for the help.
Here is what I have:
index.php
<form action="submit.php" method="POST">
<input type="text" name="question" size="20">
<input type="text" name="option1" size="20">
<input type="text" name="option2" size="20">
<input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></form>
submit.php
$outputstring = "Question: ".$question."<br>Options: ".$option1.", ".$option2."<br>=================================<br>";
$open = fopen("requests.htm", "a");
fwrite($open, $outputstring);
fclose($open);
?>
After trying out the script, the variables don't work for some reason. I get this for every input:
Question:
Options: ,
=================================
Why is the input not showing?
Also, every so often I have questions like these, but I really don't want to make a new thread each time. What should I do :confused:
Thanks for the help.
