Jump to content

PHP and Excel


pritmadlani

Recommended Posts

Hi,

 

I am looking to create a PHP database website and am wondering if I can link it to Microsoft Excel spreadsheet.  Also, I am looking to create a website whereby users can search for specific things.  E.g.  I need to create a database where I put people's names in such as FIRST NAME - "JOE" SURNAME "BLOGGS" AGE "25".  If a search is done under the FIRST NAME for "JOE", the neccessary details will be displayed on the website.  Any help is much appreciated.

 

Thank you in advance.

Link to comment
https://forums.phpfreaks.com/topic/135842-php-and-excel/
Share on other sites

You could save the excel file as a CSV then import it.. as for your search request that can be done providing you have the fields in your SELECT statment

ie

$query = "SELECT * FROM table WHERE firstname='JOE' ";
$result = mysql_query($query);
$row = mysql_fetch_assoc($result);
echo "name:".$row['Firstname']."-".$row['Lastname']." - Age".$row['Age'];

Link to comment
https://forums.phpfreaks.com/topic/135842-php-and-excel/#findComment-708188
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.