Source Code : Storing user information in a text file
PHP Is Open Source Programming Language You Can Download and use It, You required xampp server and wamp server . You download From xampp server from https://www.apachefriends.org/download.html.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://php.net/.
Click Here or search from google with Libraries Name you get jar file related it and also http://php.net/ is a official site
Storing user information in a text file
<html>
<body>
<?
$form ="<form action="index.php" method="post">
<input type="hidden" name="seenform" value="y">
<b>Give us your personal info!</b><br>
Your Name:<br>
<input type="text" name="name" value=""><br>
Your Email:<br>
<input type="text" name="email" value=""><br>
Your Preferred Language:<br>
<select name="language">
<option value="">Choose a language:
<option value="English">English
<option value="Spanish">Spanish
</select><br>
Your Occupation:<br>
<select name="job">
<option value="">What do you do?:
<option value="student">Student
<option value="programmer">Programmer
</select><br>
<input type="submit" value="submit!">
</form>";
if ($seenform != "y") :
print "$form";
else :
$fd = fopen("user_information.txt", "a");
$name = str_replace("|", "", $name);
$email = str_replace("|", "", $email);
$user_row = $name."|".$email."|".$language."|".$job."
";
fwrite($fd, $user_row) or die("Could not write to file!");
fclose($fd);
print "Thank you!";
endif;
?>
</body>
</html>
Thank with us