I'm new to this,where would you place the script for; User Registration Form <LI>Captcha Protection during Registration
<LI>User Login Form <LI>New account notification by email
<LI>Email confirmation code and activation of account
<LI>Forgot password option (resetting password for users)
<LI>Change Password option?
Also I use Godaddy as a host for my site will there SQL work for me?... read more.
Hi all today im going to show you a free php login script and how to use it.
QUOTE
Firstly the features of this script are: User Registration Form <LI>Captcha Protection during Registration <LI>User Login Form <LI>New account notification by email <LI>Email confirmation code and activation of account <LI>Forgot password option (resetting password for users) <LI>Change Password option
Following requirements you need are: - MySQL 3.x or later - PHP 4+ with GD Library - Apache Server - Linux.
So how does it work?
- User gives email and password and the script searches for that email and password in the database and if found it redirects to myaccount.php
- The password is stored in md5 format. When the user enters his password, the script converts the password to md5 string and then compares this to the md5 of the password stored in the database. We never want to know or store the real password of users. That is why we are using md5.
- This script once logged in registers 1 session variable $_SESSION['user']and which is available on all pages. Make sure that you put session_start() on top on all the pages where you want to login protect.
- While Registration, the script checks for already existing email before proceeding to create an account.
So this is how to install it: 1. First create a mysql database (say phplogin) for a particular user name (say guest) and password ( say guest). Then give all previleges of database to the user. 2. Copy the following SQL to create a table and structure below:
SQL
CREATE TABLE `users` ( `id` int(20) NOT NULL auto_increment, `full_name` varchar(200) collate latin1_general_ci NOT NULL default '', `user_name` varchar(200) collate latin1_general_ci NOT NULL default '', `user_pwd` varchar(200) collate latin1_general_ci NOT NULL default '', `user_email` varchar(200) collate latin1_general_ci NOT NULL default '', `activation_code` int(10) NOT NULL default '0', `joined` date NOT NULL default '0000-00-00', `country` varchar(100) collate latin1_general_ci NOT NULL default '', `user_activated` int(1) NOT NULL default '0', PRIMARY KEY (`id`) )
Open up dbc.php to edit mysql database name, user name and password.
Here mate simply copy and paste this into a text editor such as notepad:
CODE
<form> <p>ENTER USER NAME : <input type="text" name="text2"> </p> <p> ENTER PASSWORD : <input type="password" name="text1"> <input type="button" value="Check In" name="Submit" onclick=java script:validate(text2.value,"free",text1.value,"javascript") > </p>
</form> <script language = "javascript">
/* Script by Anubhav Misra (anubhav_misra@hotmail.com) Submitted to JavaScript Kit (http://javascriptkit.com) For this and 400+ free scripts, visit [url=http://javascriptkit.com]http://javascriptkit.com[/url] */
function validate(text1,text2,text3,text4) { if (text1==text2 && text3==text4) load('success.htm'); else { load('failure.htm'); } } function load(url) { location.href=url; } </script>
How to configure the script? To change the login/password, change "free" and "javascript" inside the script, respectively. To change the destination URLs, modify "success.html" and "failure.html."
Hey Jsp doesn't stand for JavaScript its Java Server Pages. Also change your source code so that they are placed in code blocks or a mod will have to edit it and you'll lose credits for wasting their time.
Any form of validation through JavaScript should (even must) be avoided! Why? JavaScript is a client-side language, which means that it is run on your computer, and not on the server. Therefore, for your computer to be able to run it, the JavaScript code must be supplied. And if the code contains the password, all you would have to do is take a look at the code and figure out how to log in.
For the script above I would just have to view the source code and I would know right away that the username and password are free/javascript
Here mate simply copy and paste this into a text editor such as notepad: <form> <p>ENTER USER NAME : <input type="text" name="text2"> </p> <p> ENTER PASSWORD : <input type="password" name="text1"> <input type="button" value="Check In" name="Submit" onclick=java script:validate(text2.value,"free",text1.value,"javascript") > </p>
</form> <script language = "javascript">
/* Script by Anubhav Misra (anubhav_misra@hotmail.com) Submitted to JavaScript Kit (http://javascriptkit.com) For this and 400+ free scripts, visit http://javascriptkit.com */
function validate(text1,text2,text3,text4) { if (text1==text2 && text3==text4) load('success.htm'); else { load('failure.htm'); } } function load(url) { location.href=url; } </script>
How to configure the script? To change the login/password, change "free" and "javascript" inside the script, respectively. To change the destination URLs, modify "success.html" and "failure.html."
Hope this helps, Surbjit
i checked your script, this only client-side script, can not get login info from database. javascript juz to validate form, like blank field, invalid format and its can not be used at server-side. hoping for better jsp script
Nice script! It's a good system, and a secure one at that (From what I saw). The mailing aspect of the validation stopped me from testing it out though, haha.
Nice script! It's a good system, and a secure one at that (From what I saw). The mailing aspect of the validation stopped me from testing it out though, haha.
I'll be sure to try out the captcha later though.
Yeah the captcha works. Also theres something wrong with the validation email bit you need to insert mail() somwhere in the register.php and activate.php files.
I've downloaded the attachment and tried it out, doesn't seem to work for me. The register script is always saying "Invalid Code Entered", even when I get it right. Help please?
I'm new to this,where would you place the script for; User Registration Form <LI>Captcha Protection during Registration
<LI>User Login Form <LI>New account notification by email
<LI>Email confirmation code and activation of account
<LI>Forgot password option (resetting password for users)
<LI>Change Password option?
Also I use Godaddy as a host for my site will there SQL work for me?
Email Activation
Free Php Login Script! (includes Register, Login, Logout Forms And Includes Captcha).
Wonderful tutorial! I just have one question is there a way to set a time limit for activating an account so that if they do not activate the account in so many days that it will automatically delete the account from the database to keep it nice and clean from people who never activate their accounts?
Hello, i tried thsi script, however, it is not recognising when I am logged in. So it always displays the my account and other pages as 'you must be logged in' as thats what I set it to show if i wasn't logged in. i have a thread
I tried registering a new domain with cjb.net, filled out the web form, hit "Registe" and... it
reloads the page with all of my options already entered, no message saying that there was a problem,
anyone else able to replicate these results?....
I need a login script . who can help me ? i want it to have forgot password option like yahoo to
don`t send the password in email . for put the secret answer and all details and after to put the
new password . ....
PHP FormMail Generator QUOTE PHP FormMail Generator - A tool to create ready-to-use web forms
in a flash. Once the form has been generated, you have a full functional web form. Including error
checking of required fields, email address validation, credit card number & expiry date checking,
multiple attachments sending, and email auto responding. Features: Unlimited fields of form
All standard type of fields, plus lots of template, such as credit card number & expiry date...
List/menu builder for multiple lists of Radio Buttons, Selection Menu, Check Box. Er....