Just learn PHP and wrote a very simple "app" and now wanting to take it offline.

Is JavaScript how we access and create databases on a local level if HTML5 now?

Trying to connect all the dots.

Recommended Answers

All 5 Replies

Member Avatar for stbuchok

Look at IndexDB. This is not a standard yet and only works in a few browsers (Chrome I believe).

This is not going to be as nice as actually creating a proper desktop app, but for simple things, it should meet your needs.

Member Avatar for jmichae3

there is a file API new to HTML+Javascript.

this combined with ability to generate something which the user can save, such as the cross-platform JSON database file, would give you what you need.

also, JSON is available in JQuery and YUI.

I think being relativetly new to JavaScript, that API just blew me away.

I want to store the data the user is submitting locally but then push it to the server once it goes back online.

Is this still the correct location?

Is that file API still my next step?

thanks

Member Avatar for jmichae3

given what you just told me, perhaps what you are looking for is AJAX (Asynchronous Javascript And XML). you can pass your data across as XML or as JSON, possibly through a form control, or (I am not sure about this) maybe xml embedded in an xhtml page and parsed by PHP. but frankly PHP DOM parsing is not something I have tried before. there is an XML parser build into PHP. you feed it what it wants, and voila, instant array.

Member Avatar for jmichae3

check this out for database and local storage...

this might only answer the local file storage question. there is a File API: Writer and a database api.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.