How do I get it up and running!!??

Topics: User Forum
Oct 10, 2011 at 12:35 PM


I have a few questions but first of all, I think this question should be put in the "General questions" part. But where can I find the "general question" part/menu item? Ooh I believe that I see it, is it the 'User Forum'?

I have download the 1.7.6, the 1.7.6 with documentation and the PEAR...

I'm using XAMMP and I have a Linux hosting provider. But how do I implement the library? Where can I find this documentation. I think I have to copy it somewhere in the PHP/PEAR directory but I'm not shure.

I'm reading the documentation and I see the there for example: "See Examples/Reader/exampleReader16.php for a working example of this code." But where can I find these examples, so that I can see how it works? Or do I not looking good?

Then my real question is:

I webmaster of a volleybal club. The member registration is done in excel. I'm writing now a login-, uploading-, and downloading script. I want also that if somebody uploads the member excel file, he can press on button "update site" then the excel file must converted to csv and then I have a php mysql script which filling the table members.

Question is: Is it posible without opening the xls member file  to this to a  member .csv file? Or if I want to have it in csv then I to read the cell content so as written in the documentation, write this in memory or to a csv file, and then run my MySQL script?

I hope that someone can help me

Thanks in advance.


Oct 10, 2011 at 12:39 PM

try looking in the /docs dir for docs, or perhaps the /examples dir for examples.


The whole idea of a library is that you don't have to implement it, you can just use its functionality. As for your site, I seems unlogical to convert an excel spreadsheet to a csv file and then import that. i would rather just read the xls file, and write the values straight to the database.

Oct 10, 2011 at 12:56 PM
Edited Oct 10, 2011 at 1:09 PM

I have find the file install.txt and I think I can handle it now by myself.

Ooh that's better idea yeah in stead of converting the excel to csv:

for ("all members") {

mysql_query("INSERT INTO members (id, name, street,  etc) VALUES ('','" . $name . "', '" . $street . "', '" . $etc . "', '" . etc . "')");


Oct 10, 2011 at 1:08 PM

remember to implement proper escaping and input validation (or else you leave yourself open to all kind of nastiness, remember little Bobby Tables). Either use for example mysql_real_escape_string and something like sprintf to build your queries, or use a more sophisticated db layer like php's PDO.


Have a look in the Tests dir for some examples (for example 07reader.php)

Oct 10, 2011 at 1:18 PM

I have programming experience but I'm certainly not a guru at PHP. But do you mean like this:

....  VALUES ('','" . mysql_real_escape_string($name) . "', '" . mysql_real_escape_string($street) . "', '" . $etc

Or do you mean something else? No I don't remember little Bobby Tables? I will google on "building queries sprintf" and "PHP PDO", because I don't know what that is.

Oct 10, 2011 at 1:27 PM
Edited Oct 10, 2011 at 1:27 PM

for bobby tables I refer to xkcd  :)


example of pdo:


$db = new PDO('mysqli://dbserver/db', 'root', 'secretpw');

$stmt = $fb->prepare('INSERT INTO sometable(name, address) VALUES(:name, :address)');
$stmt->bindParam(':name', $name);
$stmt->bindParam(':address', $address);


This will make sure different data types are properly inserted. If you really want to stick to the procedural functions, then mysql_real_escape_string() is the way to go. Remember to use the link resource returned by mysql_connect, so real_escape_String actually knows the parameters of your db connection.

Oct 12, 2011 at 12:50 PM
Edited Oct 12, 2011 at 12:53 PM

Hello borft,

In the meantime I have read a tutorial about PDO and I'm gonna use it in combination with PHPExcel. I have found the examples etc.

Thanks for the advise/tip