简体   繁体   中英

how to access/insert into server database using html5 and javascript

I have to develop a website for mobile phones and I am using html5 and javascript. Can I access/insert into server database using html5 and javascript only without using asp, php or any other server side language.

Yes it is. You will however need a backend database with a HTTP interface. One of which is MongoDB which has a REST interface.

More info here http://www.mongodb.org/display/DOCS/Mongo+Extended+JSON

No, you can't, and if you could then you would be insane to do so as it would allow everybody to make arbitrary SQL queries.

Use javascript and maybe you may not want to connect to mysql... Try.csv formats and excel... It's good if you are not storing sensitive information.

Html and Javascript are the Front end side languages, it not advisable to use those languages features to connect to database. Later it would be very tough to maintain it and enhance it.

ALWAYS THINK IN FUTURE PERSPECTIVE, else your code becomes obsolete

instead you can use any scripting language like php to connect to database. Since you wanted to create a website, obviously PHP and mysal will be always available to you at NO COST.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM