hello, can PHP link to excel? because i'd like to use excel to store my data, then after the user enter their details such as age, gender, then the excel will receive the data and calculate the amount then send back to the browser. How can it be done? or got other alternatives to do it? store in database??
A database would be your best bet. To get data into excel, you have to use COM, it gets real ugly.
Personally I'd do it in a MySQL database. That'll give you more flexibility down the road if you want to start doing more with that data. You can do a MySQL dump in several formats... I don't know if it'll dump to an Excel file or anything readable by Excel, but perhaps you could store the data in a MySQL DB, and everytime you modify that data, dump it to a file on your server, then you could just go to that new location and have your excel data, but again, I'm not sure if it'll dump to an excel file, do a little research.
http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#mysqldump
If you just need it in excel, you could do a couple things.
1) Use MS Access to connect to the DB through ODBC. Access has an option to "Analyse in Excel"
2) Dump it to a comma delimited file and import to Excel