If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hi sorry about the Title I'm not sure how to describe my issue properly.

I have Created a website which has a Validated Registration form and once the user fills in the required fields it needs to be submitted to some sort of DB/file to be stored so it can be called by my java script login form which then gives the user access to the website.

The website files have to be run locally so I'm able to email/move them around and remain functional on a variety of different machines without requiring a local web server(xamp etc..) being setup. As a Last resort i can install the DB/XML/ whatever storage options i have on my own Web server, provided everything else stays local.

The DB/Document only needs to hold a few names,email address and a username/password which will be called by javascript to login.(these are not required to be secured as they're mockups)

I've been having a lot of trouble trying to work out what options i have to achieve this and what is the easiest path to follow.

From what I've gathered i can use java script and an XML doc but I'll need to make a XML Writer/Reader for it to work which I'm quite confused about as its a bit over my head atm or at least will be without some straight forward instructions.
I'm not sure if i could use Ajax and have a sql db on my Server, i know some code works locally but from what i understand a lot of it does still require a server/installation.
jQuery may also be possible but I've had some trouble finding the information i need.

If Anyone knows of a good way to achieve my goal it would be fantastic, I'm out of ideas >.<

Big thanks in advance.

(I'm not sure if I'm using the correct terminology for some things or if my question makes sense/ added enough information for you guys so apology's in advance)

You can't use a database with just javascript.
You need a server side language (php, asp, cgi) to modify the database and that, inturn, means that you would need to run it on a server.

Is there a specific reason you can't just upload it all to the server and then just email around a link to it?

You mentioned that this is so that users can login... Using javascript, you can't provide a secure login... Anyone would be able to login... whether it be by disabling javascript or just editing the source...
Am I missing something about this?

Just to be clear, however, it is not possible to do this securely in the browser - especially if it's local files. If the files are already on the machine, there's no way to protect them, short of encryption.

There are some theoretical workarounds, but they would be strange. Only sending (but not retrieving) information isn't too difficult-- you can do it through an image (this sounds bizarre, but it works). However, you would need a server somewhere to receive it. Basically you're create a dynamic image on the server that allows you to submit get variables in the URL for parameters. This could be done using the GD image library in PHP.

But then actually receiving a response (aside from loading a different image) you'd need to work around security settings, which can be very difficult especially locally. It's perhaps theoretically possible but not easy in any sense.

In short, this is completely the wrong way to go about it. But I just wanted to add some technical details that it's not entirely impossible, if you're using another server along with your local page. But then why use the local page at all?

And there are some other issues-- this wouldn't work at all for protecting files already on the machine as traq said. But in theory you could (at least somewhat) communicate with an external server online...