
Fireslide wrote:Never write to a text file if you don't have to.
Either some parts of the form go into a database of some kind, or you're using it to output some result which then is displayed afterwards.
That's not to say you can't test your code is working fine by writing to a text file in the interim, but really a bunch of well placed print statements achieves the same effect.
diamondd wrote:http://www.w3schools.com/html/html_forms.asp
http://www.w3schools.com/php/php_post.asp

<?php
$country = $_REQUEST['CountryList_R_1'];
echo "Selected country is $country";
$f = fopen("YOURTEXTFILEHERE.txt", "a");
fwrite($f, "$country $medal $company \n "); // build string of text to write to file.
fclose($f);
?>
Users browsing this forum: Ashigaru, Bek, Disco LT, Makena and 5 guests