So What I have currently is working, however I just cant get the right code to make it work exactly as I would like. Currently this is my code:
$type = $_POST['type'];
$size = $_POST['size'];
$age = $_POST['age'];
$gender = $_POST['gender'];
$traits = $_POST['traits'];
$comments = $_POST['comments'];
$Name = $_POST['firstn'];
$Email = $_POST['email'];
// the name of the file you're writing to
$myFile = "info.txt";
// opens the file for appending (file must already exist)
$fh = fopen($myFile, 'a');
// Makes a CSV list of your post data
$colon_delmited_list = implode(",", $_POST) . "\n";
// Write to the file
fwrite($fh, $colon_delmited_list);
// You're done
fclose($fh);
This writes to a text file and the contents are written as:
Circle, Large, 11, Male, Smart, very nice, Kyle, Kyle@gmail.com
I get all these values from a php page, however I want the values in the file to be separated by colons rather than commas, and I also want to implement a count where each entry is numbered.
Here is an example:
1:Circle: Large: 11: Male: Smart: very nice: Kyle: Kyle@gmail.com
2:Square: Small: 14: Female: Smart: very nice: Kylie: Kylie@gmail.com