Results 1 to 5 of 5

Thread: Local website(no server) User registration submission to a db?/ login info retrieval

  1. #1
    Join Date
    Oct 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Local website(no server) User registration submission to a db?/ login info retrieval

    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)

  2. #2
    Join Date
    Mar 2010
    Location
    Florida
    Posts
    303
    Thanks
    5
    Thanked 20 Times in 19 Posts

    Default

    Best way to do this is using PHP with a database.
    I can set it up which isn't hard to do.

  3. #3
    Join Date
    Mar 2011
    Location
    N 11░ 19' 0.0012 E 142░ 15' 0
    Posts
    1,509
    Thanks
    41
    Thanked 89 Times in 88 Posts
    Blog Entries
    3

    Default

    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?

  4. #4
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 517 Times in 503 Posts
    Blog Entries
    5

    Default

    PHP requires a server.

    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.

    Edit: KB beat me to it.

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    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...
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Similar Threads

  1. Replies: 2
    Last Post: 02-20-2012, 06:26 AM
  2. Replies: 4
    Last Post: 01-11-2011, 08:41 PM
  3. Replies: 29
    Last Post: 09-03-2009, 08:24 AM
  4. PHP: registration & login
    By Spinethetic in forum Looking for such a script or service
    Replies: 1
    Last Post: 06-10-2008, 03:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •