Take Input from user and Store data in Excel

Need a input for users to put in their email address to sign up for a newsletter, then the email is stored in an excel spreadsheet on this site

I have made a JQUERY PHP contact form that take inputs (Name and Email) from users. but how to store data in excel file

you can use pear to insert into excel.

check this link out:

Does the spreadsheet just have one column with email addresses? The simplest thing to do would be to just save it as a .csv file which excel understands. Just save the file with extension .csv. Then you just need to write one line to the file for each email address.

Say you have the email saved in $email… you could write something like…


$fp = fopen("path/to/emailList.csv", 'ab');
fwrite($fp, "$email  \
");
fclose($fp);


If you wanted to save more than just the email for each person, just separate each field with a comma and make sure to end each record with the new line character. As long as the file is saved with extension .csv and is formatted something like

first_name, last_name, email
first_name, last_name, email
first_name, last_name, email

Excel will open it with first_name, last_name, and email in separate columns.