Nov 8, 2009
Pages: 1, 2, 3

Free Php Login Script! (includes Register, Login, Logout Forms And Includes Captcha).

free web hosting

Read Latest Entries..: (Post #20) by iGuest on Jul 29 2009, 01:44 AM.
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.
Read the FIRST post of this Topic. - Express your Opinion! Contribute Knowledge :-).

Open Discussion > MODERATED AREA > Freebie Stuff

Free Php Login Script! (includes Register, Login, Logout Forms And Includes Captcha).

surbjit
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.


Ill add the script for download in an attachment.

Notice from jlhaslip:
Added sql tags

Notice from truefusion:
http://php-login-script.com/

 

 

 


Comment/Reply (w/o sign-up)

kplow1986
THank for sharing . this help me a lot!!! coz i m novice...hahahah

i learning jsp now, can i get jsp login script ?

Comment/Reply (w/o sign-up)

surbjit
Well you can get a Jsp login script Ill find one for you mate as I dont code javascript lol

Comment/Reply (w/o sign-up)

surbjit
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>

<p align="center"><font face="arial" size="-2">This free script provided by <a href="http://javascriptkit.com">JavaScript Kit</a></font></p>


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,

 

 

 


Comment/Reply (w/o sign-up)

sonesay
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.

Comment/Reply (w/o sign-up)

pyost
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 wink.gif

Comment/Reply (w/o sign-up)

kplow1986
QUOTE(surbjit @ Oct 30 2008, 04:54 PM) *
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>

<p align="center"><font face="arial" size="-2">This free script provided by <a href="http://javascriptkit.com">JavaScript Kit</a></font></p>

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

Comment/Reply (w/o sign-up)

Jelly
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.

Comment/Reply (w/o sign-up)

surbjit
QUOTE(Jelly @ Oct 30 2008, 10:50 AM) *
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.

Comment/Reply (w/o sign-up)

Evolix
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?

Comment/Reply (w/o sign-up)

Latest Entries

iGuest

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?


Comment/Reply (w/o sign-up)

iGuest
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?

-question by Johnny

 


Comment/Reply (w/o sign-up)

JeanieTallis
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

http://www.phpfreaks.com/forums/index.php/...html#msg1135606

HELP

Comment/Reply (w/o sign-up)

ragav.bpl
This is a common script available for free at the above mentioned site............

Although the script is quite good but i don't think it is too good in terms of security .................

Comment/Reply (w/o sign-up)

motta
hi, i tried the login script however when i clicked on the activation code i am redirected to a 404 error page ... any idea ?

Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Pages: 1, 2, 3

Searching Video's for php, login, script, includes, register, login, logout, forms, includes, captcha,
See Also,
advertisement


Free Php Login Script! (includes Register, Login, Logout Forms And Includes Captcha).

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com