Hi. I am trying to learn PHP. I created a form with action=“member.php” method=“POST”
I just want to add the information from the form to a .txt file for now.
I did this and it does not seem to be working. [php]<?php
$name = $_POST[‘name’];
$firstName= $_POST[‘firstName’];
$age = $_POST[‘age’];
$sexe = $_POST[‘sexe’];
$category = $_POST[‘category’];
$tmpE=fopen(“members.txt”,“r+”) or die (“Cannot open file”);
$line="\n".$name."\t".$firstName."\t".$age."\t".$sexe."\t".$category."; \n";
fwrite($tmpE,$ligne);
fclose($tmpE);
?>[/php]
Also I’ll be having another form in my index.html in which I can search for a member within that .txt file.
Thanks in advance for the help