Hello all,
I have a problem I cant figure out; maybe all of you smarter than I peeps can help!!!
I have a simple online signup page that when you hit submit it emails the information that was typed in the fields to a certain email address; this works.
My problem is, is that i also want it to open an existing excel file and input the same information submitted into the next available row in the excel file (not deleting any prior data).
Can someone please help, I have searched the faqs best i could and have been all over the net but they al are talking about a sqldb which i dont need or want.
Here is my code:
Thanks in advance
I have a problem I cant figure out; maybe all of you smarter than I peeps can help!!!
I have a simple online signup page that when you hit submit it emails the information that was typed in the fields to a certain email address; this works.
My problem is, is that i also want it to open an existing excel file and input the same information submitted into the next available row in the excel file (not deleting any prior data).
Can someone please help, I have searched the faqs best i could and have been all over the net but they al are talking about a sqldb which i dont need or want.
Here is my code:
Code:
<?php
$where_form_is="[URL unfurl="true"]http://".$_SERVER[/URL]['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
mail("emailname@domain.com","Signup Form","Form Submission:
Name: " . $_POST['field_1'] . "
Shift: " . $_POST['field_2'] . "
Room Selection: " . $_POST['field_3'] . "
Shirt Size: " . $_POST['field_4'] . "
Contact Number: " . $_POST['field_5'] . "
.");
$name = $_POST['field_1'];
$shift = $_POST['field_2'];
$room = $_POST['field_3'];
$shirt = $_POST['field_4'];
$contact = $_POST['field_5'];
$filename = "cares.xls";
$handle = fopen($filename, 'a');
$string_to_add = "$name\n$shift\n$room\n$shirt\n$contact\n";
fwrite($handle, $string_to_add);
fclose($handle);
include("Thanks.html");
?>
Thanks in advance