WebSite X5Help Center

 
Siron L.
Siron L.
User

Fonction POLL or VOTE can be used with DB MySQL  en

Author: Siron L.
Visited 1700, Followers 1, Shared 0  

Good Morning,

I bought the module "poll" from X5 object.

I defined a DB MySQL on my server.

I can access the DB and TABLE from my web site, but not possible to write to the DB.

If I see the poll.php provided by X5, I don't see any MySQL command in the script.

So it is right way to define a MySQL DB on my sever ?

If not what I have to do.

I'm using PHP 5.4 on my server.

Thank's for you help.

Posted on the
7 ANSWERS - 2 USEFUL - 1 CORRECT
Andre E
Andre E
Moderator

You need to create a database with your provider, you already did that.

Just fill in the data from the databasse in x5, step4 data management.

Then select the name of the database in the poll object. That's it.

Create your poll upload and test.

Read more
Posted on the from Andre E
Siron L.
Siron L.
User
Author

Thank you for you quick reply, but I already do that.

So, why there is no MySQL command in the poll.php script ?

Whitout MySQL command the DB on the server can't register the poll result.

I writen a PHP script with MySQL command and I can register info to the DB

Read more
Posted on the from Siron L.
Siron L.
Siron L.
User
Author

Here after the poll.php generated by X5

Read more
Posted on the from Siron L.
Andre E
Andre E
Moderator

I have never checkd the scripts for the poll. I just use it like descriped above and it works. And where the database scriptings happens I don't know, don't need to know also.

You need to create a database in your acces panel of your host, there you get a name password and login. These needs to be filled in in x5, and then the poll works.

That's why I have x5, to do job for me :)

Read more
Posted on the from Andre E
Siron L.
Siron L.
User
Author

ok Andre, may be my table isn't correctly formated.

Can you give me a sample of a table correctly build.

In poll object I defined only 3 possibility of voting, "Oui" "Non" "Peut-etre"

You will find in attachement the table "testluc" that I defined.

I don't have any problem to read the table from poll function the problem is only in write.

Read more
Posted on the from Siron L.
Andre E
Andre E
Moderator

You don't need to format a table, x5 will do that for you.

PLease goto your admin panel of your host, just create a databse, you will need to provide a name and password and login, fill this in x5, create the poll in x5 with the poll object, upload and that's it.

Read more
Posted on the from Andre E
Siron L.
Siron L.
User
Author

Andre,

You are a King

Thank's very much, it works

Thank you for effecient and for following my problem.

Read more
Posted on the from Siron L.