HTML5 database connectivity

All about creating websites!
Post Reply
User avatar
z3r0aCc3Ss
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 700
Joined: 23 Jun 2009, 16:00
14
Contact:

HTML5 database connectivity

Post by z3r0aCc3Ss »

Can HTML5 connect to the database at the back-end? I highly doubt that.
Can we use JavaScript to do that? I think no, because it's a client side scripting language.
So, is there any other way to connect to the database using only HTML5?
I can connect using PHP/MySQL. But without that, is it possible?

Take a look at this. Its HTML5 + JavaScript for connecting to the database.

Code: Select all

http://stackoverflow.com/questions/8338116/using-javascript-in-an-html5-page-to-connect-to-an-sqlite-database
Beta tester for major RATs, all kinds of stealers and keyloggers.
Learning NMAP

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Re: HTML5 database connectivity

Post by ayu »

The code you linked to connects to a local sqlite database, which probably resides in an isolated environment.
I don't think you can use that code to connect to, for example, a remote MySQL database.

Take a look at this

Code: Select all

https://github.com/felixge/node-mysql
And do note that using code like this will have some security issues (the password is viewable by the client, for example).
"The best place to hide a tree, is in a forest"

User avatar
z3r0aCc3Ss
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 700
Joined: 23 Jun 2009, 16:00
14
Contact:

Re: HTML5 database connectivity

Post by z3r0aCc3Ss »

Yeah, HTML5 works with local databases, i.e., local storage.
Well, I got my answer... ;)
Beta tester for major RATs, all kinds of stealers and keyloggers.
Learning NMAP

User avatar
CommonStray
Forum Assassin
Forum Assassin
Posts: 1215
Joined: 20 Aug 2005, 16:00
18

Re: HTML5 database connectivity

Post by CommonStray »

If your using PHP in the backend use AJAX techniques to send client side data to the server side asyncronously, make sure you filter and escape all data though.

Post Reply