Question on how to connect excel to php correctly

Asked By 20 points N/A Posted on -
qa-featured

Hi,

I am a web developer working on a web project. Our team needs to do a database linkage but not sure how to connect excel to php correctly and effectively. But we keep having errors regarding Arrays. We will be delighted if someone can point us the way to any tutorials or documentation regarding this particular error.

SHARE
Answered By 10 points N/A #133421

Question on how to connect excel to php correctly

qa-featured

Hi there,

It is necessary to see your code so that we can get some idea about the wrong of your code. As you said that there are some problem is occurring in array, so please solve that first by giving us the code or try yourself to solve it out. Once the array problem is solved than you can easily connect to the database by the below code:

<?php
$con = mysql_connect("servername","username","pass");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

// some code

mysql_close($con);
?>

You can get excel sheet from your PhpMyAdmin and also can open that from there. But you can connect to an excel sheet directly from the PHP code. Please see the whole procedure from the link.

https://www.techyv.com/questions/i-want-export-excel-data-file-php-format/

You can learn a lot of things from w3schools.com.

Best regards,

Riley Weaver.

Related Questions