Hi,
I am an absolute blockhead when it comes to programming. So please excuse me if this is a stupid question.
I have a site where users register for seminars. The php code that I had someone write for me submits their data to me by e-mail and takes them to a thankyou page where they can see the data. All of this works very well.
What I would like to do is to also have the data stored in a .csv file on my site so that I can import the data into Excel as a backup. I have no idea how to do this or even if it is possible.
Following is the part of the code I am using. I've left out the part where the variables are defined. If you can help me with this, I will also need to know where to put the new information in the existing code as I am clueless.
//List of Headers
$headers.="Content-type: text/html; charset=iso-8859-1\r\n";
$headers.="From: $email\r\nReply-To: $email";
//Declare the variables
// This line below is the E-mail address the form will be sent to.
$recipient = "myaddress@mydomain.com";
$subject = "$location Road to Financial Freedom seminar";
$message = "<html>$firstname $lastname just registered for a Road to Financial Freedom seminar. Here is the information they provided.<br><br><br>
<b>Location:</b> $location<br>
<b>Date:</b> $date<br>
<b>Name:</b> $firstname $lastname<br>
<b>Second Participant:</b> $secondname<br>
<b>Address:</b> ".urldecode($address)."<br>
<b>City:</b> ".urldecode($city)."<br>
<b>Province/State:</b> ".urldecode($state)."<br>
<b>Postal Code/Zip Code:</b> ".urldecode($zip)."<br>
<b>E-mail Address:</b> $email<br>
<b>Phone Number:</b> $phone<br>
<b>Fax Number:</b> $fax<br>
<b>How did they hear about the seminar:</b> $hear $othername<br>
</html>
.
";
//mail() function sends the mail
mail($recipient,$subject,$message,$headers)
?>
Thanks for any help that you can give,
Mervyn