We help IT Professionals succeed at work.

database html 5

jagguy
jagguy asked
on
Can html 5 connect to server side databases?
I cant see anywhere how i can connect to a sql server DB or mysql.
Also I dont want to use a complicated solution or is it in the pipeline to develop?
Comment
Watch Question

It might be easier for you to access a database with php.Almost every webhost supports it,and it is quite
flexible for whatever you might need.Php and mysql both work together like charm!
Top Expert 2013

Commented:
A browser cannot connect directly to a database your need some kind of server side scripting as mentioned php is widely used and asp and jsp are also common.


The choice of server scripting language depends on the server environment.

Cd&

Author

Commented:
ok so i can include php/mysql like in html 4 eg nothing has changed
there is no  DB features with html5 and server side DB's
Top Expert 2013

Commented:
HTML5 is just markup it adds new features on the client side, but it never directly interacts with anything outside the browser.  Once a page is downloaded it is just data that the browser uses to build the document object. all the dynamic come from javascript manipulating the on the document object and the built in methods of embedded objects.


Cd&
RobOwner (Aidellio)
Most Valuable Expert 2015

Commented:
only plugins such as activex and applets can access databases directly from the browser
Top Expert 2013

Commented:
No different than HTML 4 or XHTML.  Activex has been around over 10 years and is IE only, and applets almost as long.
And they bath have security risk associated with them.


Cd&
RobOwner (Aidellio)
Most Valuable Expert 2015

Commented:
Thanks for clarifying that @COBOL - very valid point :)
Commented:
hello,

If what you want to to is a standalone application using your webrowser, HTML5 allow you to use some local storage throw the application cache and for database, you can connect directly to a SQLite database using PHP.

more info here : http://www.html5rocks.com/en/tutorials/appcache/beginner/
and here with a complete demo code : http://blog.zenika.com/index.php?post/2011/02/17/Html5%3A-le-mode-Offline

your browser have to be full capable tu run properly this code. Try Safari...

If you want to do an online server side application, you can use PHP/MySQL which is a good choice.

best regards,

Hope to be helpfull.

Pascal LEGAL