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

Jump to content


Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
Page 1 of 1

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

#1 User is offline   surbjit 

  • Member [Level 3]
  • PipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 90
  • Joined: 26-October 08
  • myCENT:READY[148.22]
  • Current Mood: Current Mood: None Chosen

Posted 30 October 2008 - 08:28 AM

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

Attached File(s)


0


Page 1 of 1

Other Replies To This Topic

#2 User is offline   kplow1986 

  • Member [Level 1]
  • PipPipPipPip
  • Group: Kontributors
  • Posts: 59
  • Joined: 30-October 08
  • Location:Malaysia
  • myCENT:7.65
  • Current Mood: Current Mood: None Chosen

Posted 30 October 2008 - 08:44 AM

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

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

#3 User is offline   surbjit 

  • Member [Level 3]
  • PipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 90
  • Joined: 26-October 08
  • myCENT:READY[148.22]
  • Current Mood: Current Mood: None Chosen

Posted 30 October 2008 - 08:52 AM

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

#4 User is offline   surbjit 

  • Member [Level 3]
  • PipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 90
  • Joined: 26-October 08
  • myCENT:READY[148.22]
  • Current Mood: Current Mood: None Chosen

Posted 30 October 2008 - 08:54 AM

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 [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,
0

#5 User is offline   sonesay 

  • |||[ n00b King ]|||
  • PipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 924
  • Joined: 20-June 07
  • Gender:Male
  • Location:Auckland
  • myCENT:13.12
  • Current Mood: Current Mood: None Chosen

Posted 30 October 2008 - 09:22 AM

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

#6 User is offline   pyost 

  • Newbie [Level 2]
  • PipPip
  • Group: Kontributors
  • Posts: 31
  • Joined: 22-November 07
  • Location:Belgrade, Serbia
  • myCENT:96.64
  • Current Mood: Current Mood: None Chosen

Posted 30 October 2008 - 09:26 AM

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 :)
0

#7 User is offline   kplow1986 

  • Member [Level 1]
  • PipPipPipPip
  • Group: Kontributors
  • Posts: 59
  • Joined: 30-October 08
  • Location:Malaysia
  • myCENT:7.65
  • Current Mood: Current Mood: None Chosen

Posted 30 October 2008 - 10:18 AM

View Postsurbjit, on Oct 30 2008, 04:54 PM, said:

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
0

#8 User is offline   Jelly 

  • Newbie [Level 3]
  • PipPipPip
  • Group: Kontributors
  • Posts: 48
  • Joined: 26-October 08
  • myCENT:90.34
  • Current Mood: Current Mood:

Posted 30 October 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.

This post has been edited by Jelly: 30 October 2008 - 10:51 AM

0

#9 User is offline   surbjit 

  • Member [Level 3]
  • PipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 90
  • Joined: 26-October 08
  • myCENT:READY[148.22]
  • Current Mood: Current Mood: None Chosen

Posted 30 October 2008 - 01:51 PM

View PostJelly, on Oct 30 2008, 10:50 AM, said:

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

#10 User is offline   Evolix 

  • Advanced Member
  • PipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 135
  • Joined: 14-October 08
  • myCENT:NEGATIVE[-57.75]
  • Current Mood: Current Mood: None Chosen

Posted 30 October 2008 - 01:58 PM

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

#11 User is offline   Jelly 

  • Newbie [Level 3]
  • PipPipPip
  • Group: Kontributors
  • Posts: 48
  • Joined: 26-October 08
  • myCENT:90.34
  • Current Mood: Current Mood:

Posted 30 October 2008 - 02:47 PM

The mail part was because all my mailing ports are blocked, just have to change the script around and stuff then.

The captcha worked though :)
0

#12 User is offline   surbjit 

  • Member [Level 3]
  • PipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 90
  • Joined: 26-October 08
  • myCENT:READY[148.22]
  • Current Mood: Current Mood: None Chosen

Posted 30 October 2008 - 03:20 PM

View PostEvolix, on Oct 30 2008, 01:58 PM, said:

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?


Does the actual register form load up?
0

#13 User is offline   Jelly 

  • Newbie [Level 3]
  • PipPipPip
  • Group: Kontributors
  • Posts: 48
  • Joined: 26-October 08
  • myCENT:90.34
  • Current Mood: Current Mood:

Posted 30 October 2008 - 03:43 PM

I'm pretty sure it'd have to to get to the point of processing the account information.
0

#14 User is offline   surbjit 

  • Member [Level 3]
  • PipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 90
  • Joined: 26-October 08
  • myCENT:READY[148.22]
  • Current Mood: Current Mood: None Chosen

Posted 30 October 2008 - 04:02 PM

View PostEvolix, on Oct 30 2008, 01:58 PM, said:

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?



Hmm thats unusual have you uploaded it to your host ? Or used a program like Xammp and put it into your localhost directory?
0

#15 User is offline   surbjit 

  • Member [Level 3]
  • PipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 90
  • Joined: 26-October 08
  • myCENT:READY[148.22]
  • Current Mood: Current Mood: None Chosen

Posted 30 October 2008 - 04:11 PM

I put up a demo also :

http://surbjit.freeh...a.com/login.php

Note: The demo will not send the validation email as the host does not have the mail() function but everything else works.
0

#16 User is offline   ricmetal 

  • Newbie
  • Pip
  • Group: Kontributors
  • Posts: 1
  • Joined: 21-November 08
  • Current Mood: Current Mood:

Posted 21 November 2008 - 12:29 PM

working great :)
thanks :)
0

#17 User is offline   motta 

  • Newbie
  • Pip
  • Group: Kontributors
  • Posts: 1
  • Joined: 30-December 08
  • Current Mood: Current Mood:

Posted 30 December 2008 - 06:32 AM

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

#18 User is offline   ragav.bpl 

  • Premium Member
  • PipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 175
  • Joined: 01-January 09
  • Gender:Male
  • Location:Computer World
  • myCENT:61.56
  • Current Mood: Current Mood: None Chosen

Posted 30 January 2009 - 11:10 AM

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

#19 User is offline   JeanieTallis 

  • Newbie
  • Pip
  • Group: Kontributors
  • Posts: 1
  • Joined: 15-March 09
  • Current Mood: Current Mood: None Chosen

Posted 15 March 2009 - 09:47 PM

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
0

#20 User is offline   iGuest 

  • Hail Caesar!
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 5,876
  • Joined: 21-September 07
  • Interests:Trap17 Free Web Hosting, No Ads
  • Current Mood: Current Mood: None Chosen

Posted 16 April 2009 - 03:47 AM

Email ActivationFree 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

 


0

#21 User is offline   iGuest 

  • Hail Caesar!
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 5,876
  • Joined: 21-September 07
  • Interests:Trap17 Free Web Hosting, No Ads
  • Current Mood: Current Mood: None Chosen

Posted 29 July 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?


0

#22 User is offline   sheikh76 

  • Newbie
  • Pip
  • Group: Kontributors
  • Posts: 1
  • Joined: 15-December 09
  • Current Mood: Current Mood:

Posted 15 December 2009 - 04:29 PM

View Postsurbjit, on Oct 30 2008, 09:28 AM, said:

Hi all today im going to show you a free php login script and how to use it.


Ill add the script for download in an attachment.

Notice from jlhaslip:
Added sql tags

Notice from truefusion:


Hi,

I'm try to register by using registration failed. It is because code not appear in page. Can you assist me on this matter and please refer to attachment.

Sheikh

Attached File(s)

  • Attached File  Doc1.doc (83.5K)
    Number of downloads: 0

0

#23 User is offline   Ash-Bash 

  • 1337 HaxXx0r
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Kontributors
  • Posts: 1,227
  • Joined: 04-February 09
  • Gender:Male
  • Location:UK
  • Interests:Computers, PHP, HTML, Snow, Food!
  • myCENT:39.08
  • Spam Patrol
  • Current Mood: Current Mood: Relaxed

Posted 01 January 2010 - 01:23 AM

Thank-You for sharing this with me and us. I have used this on my webpage or my bot net :).
0

#24 Guest_Raghuldev_*

  • Group: Guests

Posted 14 July 2010 - 09:37 AM

I got the mail when registering as follows
Thank you for registering an account with isteal.net. Here are the login details...


User Email: me@yahoo.com

Password: mortal

Activation Code: 3653

____________________________________________
*** ACTIVATION LINK *****

Activation Link: http://mydomain.com/...o.com&code=xxxx


but this shows up a 404 error
0

#25 User is offline   TomCol 

  • Newbie [Level 3]
  • PipPipPip
  • Group: Kontributors
  • Posts: 41
  • Joined: 14-May 10
  • Gender:Male
  • myCENT:68.33
  • Current Mood: Current Mood: None Chosen

Posted 17 July 2010 - 12:23 PM

Meh, I wrote my own login scripts :)
0

Share this topic:


Page 1 of 1


Similar Topics Collapse

  Topic Forum Started By Stats Last Post Info
Locked Topic Icon Free Web Hosting Application [denied]
by paldays
Free Web Hosting Account request paldays 
  • 1 Reply
  • 364 Views
Locked Topic Icon Free Web Hosting Application [approved]
by dakokoy
Free Web Hosting Account request dakokoy 
  • 1 Reply
  • 228 Views
*Hot Topic (New) Icon php easy? General Talk Guest_sandman_* 
  • 21 Replies
  • 2,789 Views
Hot Topic (New) Icon Free .info Domains
Get free .info domain instantly | Your own Control Panel | No Advt. |
Freebie Stuff k_s_baskar 
  • 30 Replies
  • 4,359 Views
Locked Topic Icon Free Web Hosting Upgrade
Hosting Upgrade: chaosportal.trap17.com
Free Web Hosting Account Upgrade Solar 
  • 1 Reply
  • 1,435 Views
New Replies Icon Free And Easy Graphics Tool .... Freebie Stuff Milovoriel 
  • 5 Replies
  • 1,011 Views
New Replies Icon Free Softver
Links for free softver
Software MetalGear 
  • 3 Replies
  • 2,912 Views
New Replies Icon Php Include Script
How to add into a table
Website Discussion Cerb 
  • 6 Replies
  • 1,389 Views
Locked Topic Icon Free Web Hosting Application [updated]
by hertonsils
Free Web Hosting Account request hertonsils 
  • 1 Reply
  • 368 Views
Locked Topic Icon Free Web Hosting: (sonorama)
Free Website: <sonorama.net>
Free Web Hosting Account request sonorama 
  • 1 Reply
  • 971 Views
New Replies Icon New To Trap17 Free Hosting
Help with website (i dont understand...)
your Secret HideOut ProfBob 
  • 4 Replies
  • 1,151 Views
New Replies Icon Greeting All Im New To The Forums Feel Free To Leave Me A Message. Introductions pokerincent 
  • 0 Replies
  • 244 Views
Locked Topic Icon Free Web Hosting: (dor)
Free Website: <dor.trap17.com>
Free Web Hosting Account request DoR 
  • 1 Reply
  • 720 Views
Locked Topic Icon Free Web Hosting: (premracer)
Free Website: <PremRacer.trap17.com>
Free Web Hosting Account request premracer 
  • 1 Reply
  • 331 Views
New Replies Icon Ptr Site - Special Offer
Free Ad/Membership and much more!!!!!
Make Money Online Little_Money_Maker 
  • 0 Replies
  • 597 Views
Hot Topic (New) Icon 500 Mb Free File Host!
http://www.spread-it.com/
Freebie Stuff specter 
  • 18 Replies
  • 9,546 Views
Locked Topic Icon Free Web Hosting: (mjay06)
Free Website: <totalstudent.trap17.com>
Free Web Hosting Account request Mjay06 
  • 1 Reply
  • 502 Views
New Replies Icon Free Web Games Freebie Stuff Wargasmic 
  • 9 Replies
  • 2,179 Views
New Replies Icon Need A Phpbb3 Halo Template Web Design CorporalTurnips 
  • 1 Reply
  • 2,617 Views
New Replies Icon Free Hosting For Student
how to use free hosting for study purpose & more.
Introductions harishbhushan 
  • 3 Replies
  • 690 Views

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Google Fan :-) We Recommend Firefox.     Customize / Settings Connect Us on facebook