0

My Question is simple: which programming language do you recommand me to do what I want below.

I have an html page and some javascript. On the html page you see a card game and some actions of the card. In my javascript I hardcoded for the moment the cards of every players. In the future I don't want hardcoded decks. I want to get the info of which players has which cards in his hand from a mysql database.

I don't think javascript (or jquery) is the way to do it. What do you recommand me to use?

2
  • PHP is typically used for server side scripting on web pages. Commented Apr 20, 2017 at 17:48
  • PHP. While it is possible to access your database with javascript or jQuery, it is NOT recommended. You can combine the jQuery and PHP using ajax, which will probably do what you require. Commented Apr 20, 2017 at 17:50

3 Answers 3

1

I think you need Ajax Calls, a MySQL database with phpmyAdmin for example and some php.

Ajax 101: https://gist.github.com/joelrojo/c54765a748cd87a395a2b865359d6add

Sign up to request clarification or add additional context in comments.

Comments

0

You can consider nodejs. The package mysql can allow you to insert data into the database and read them when needed.

https://www.npmjs.com/package/mysql

Comments

0

Use PHP to retrieve info of which players has which cards in his hand from your MySQL database.

For further reference please refer http://php.net/docs.php

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.