PDA

View Full Version : Login/logout/registrationpg/member pg



xhilaration
03-15-2015, 02:11 AM
Is there anyway in making a:
Login
Logout
Registration pg
Member pg
In javascript instead of usinf php -> mysql & -> db? Or does it have to be in php???

If there is a javascript like it, please can anyone post the codes in this thread :)

styxlawyer
03-15-2015, 12:22 PM
Not easily.

PHP is executed on the server and the database needs to be there for a membership login to work, so the transactions are simple. Javascript is executed on the local client and would require some complex AJAX transactions to access a server-side database.

Beverleyh
03-15-2015, 03:11 PM
It's quite easy with php (although a little harder to be done with a good level of security) and a database is not always required - you can do it with an encrypted flat file and sessions. However, standalone javascript is not the tool for a login system and can easily be circumvented by viewing the source of a web page.

For starters you could try the Login Session script from this site http://www.myphpscripts.net/scripts.html I used it for a few projects in the past and it was nice and easy to setup and customise. From memory, it has member registration, login and logout included, and members pages can be setup manually using snippets from the tutorial I wrote here http://www.myphpscripts.net/tutorial.php?id=18
And for added security, also use the tips here http://www.myphpscripts.net/tutorial.php?id=4

If you want to try other/similar scripts, try searching Google for "flat file php login script" or "flat file php membership system" and play around with what you find.

For a more complex solution, a database might be the way to go but it depends on your project.

xhilaration
03-15-2015, 08:57 PM
Great, thank you guys :)

I understand now hehe