2 Replies - 882 Views - Last Post: 17 March 2013 - 07:00 AM

#1 scentauri  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 63
  • Joined: 16-February 11

Single Page Website with Database Interaction

Posted 13 March 2013 - 07:15 PM

Hello,

I've been assigned a task to convert a FLASH-based game into HTML5. I've been informed to use AJAX & JSON to interact with the databases to load game functions.

My idea is to create a single page website for the game that involves HTML, CSS, Javascript/JQuery, AJAX/JSON. The single page website would allow users to log in and then populate the game for users. The screen would change depending on whether the user is at the login, lobby, table, or game screen by using DIVs and setting only one screen to visible, while hiding the others with the CSS display:none.

What I'd like to know is whether it's even possible to create a single page HTML5 website for the game that allow login and subsequent game features to load all on the single page?

Is This A Good Question/Topic? 0
  • +

Replies To: Single Page Website with Database Interaction

#2 scentauri  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 63
  • Joined: 16-February 11

Re: Single Page Website with Database Interaction

Posted 13 March 2013 - 07:52 PM

I have discovered that this is possible as I will be using JSP to interact with the database. At least it works in theory in my mind.
Was This Post Helpful? 0
  • +
  • -

#3 CynicalSolution  Icon User is offline

  • New D.I.C Head

Reputation: -3
  • View blog
  • Posts: 15
  • Joined: 17-March 13

Re: Single Page Website with Database Interaction

Posted 17 March 2013 - 07:00 AM

Yes its possible, You should use the jQuery Library to call PHP Scripts

I Wouldn't bother with JSP to be honest and you will have much more fun with PHP.

Your Flow should work like this,

User Loads Page -> jQuery function runs php script for x/y/z server side functions -> User Attempts to login -> Use jQuery to call php without page reload and so on


Some things to look up

mysqli or PHP:PDO(Complex if you have never used php or OOP)
jQuery Library (Call Script without page reload)
Basic Logic and syntax in PHP

Happy to provide examples tomorrow i got to sleep now
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1