WHAT I HAVE SO FAR:
This is what i've created so far. It's writing in to .txt file and with a different format that i want to change.
Code:
<?php
$myfile = fopen("emaillist.txt", "a+");
$txt = $_POST['country'] . " -- " . $_POST['email'] . "\n";
fwrite($myfile, $txt);
fclose($myfile);
header("Location: http://www.myredirectlocation.com");
?>
So basically with this code i'm storing registered emails. As of now my emails are stored like this in a .txt file:
USA -- email1@something.com
USA -- email2@something.com
Canada -- email3@something.com
WHAT I NEED:
I want to write into .csv or .xls file instead of .txt file.
And also i want it to make columns for each country and write in seperate rows. So it will look like this:
USA | Canada | Australia
email1@something.com | email2@something.com | email3@something.com