NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Very Very Simple login script

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 08-07-2005, 12:07 AM THREAD STARTER               #1 (permalink)
Senior Member
 
Eric's Avatar
Join Date: Mar 2005
Posts: 4,948
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics

Very Very Simple login script


This is a very simple login script.

The Form
Code:
<html>
<body>

<form name="form" method="post" action="login.php">
Username: <br>
<input type="text" title="Username" name="Username"><br>
Password: <br>
<input type="password" title="Password" name="Password"><br>
<input type="submit" name="Submit" value="Login">

</form>
</body>
</html>
login.php
PHP Code:
<?php
/************************
Very Simple Login v1.0
Copyright (c) SecondVersion
????: NamePros.com http://www.namepros.com/programming/113317-very-very-simple-login-script.html
************************/
$username 'username';
$password 'password';

if(
$_POST['Password'] == $password || $_POST['Username']== $username) {

header('Location: http://www.yourdomain.com/path/to/membersarea');
}
else {
  print(
'Wrong username or password. <a href="javascript:history.go(-1)">Please try again.');
}

?>
Last edited by SecondVersion; 08-07-2005 at 12:41 AM. Reason: Forgot Something
Eric is offline  
Old 08-07-2005, 12:21 AM   #2 (permalink)
Account Closed
 
vip-ip's Avatar
Join Date: Jan 2005
Location: root@localhost
Posts: 4,025
vip-ip is an unknown quantity at this point
 



Grat one!
vip-ip is offline  
Old 08-07-2005, 12:24 AM THREAD STARTER               #3 (permalink)
Senior Member
 
Eric's Avatar
Join Date: Mar 2005
Posts: 4,948
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
Thanks lol... Told ya.. very very, well.. very very very very simple
Eric is offline  
Old 08-07-2005, 12:29 AM   #4 (permalink)
Senior Member
 
JoshHendo's Avatar
Join Date: Apr 2005
Location: Australia
Posts: 1,092
JoshHendo is a jewel in the roughJoshHendo is a jewel in the roughJoshHendo is a jewel in the rough
 



Very Very Very Very Simple . When are you going to release the simple log in script, and the not so simple one
__________________
:bingo: :kickass: :lala: :notme: :great: :gn:
JoshHendo is offline  
Old 08-07-2005, 12:57 AM   #5 (permalink)
Account Suspended
Join Date: Jun 2005
Posts: 189
killerid is an unknown quantity at this point
 




i am looking for a login script which can be placed on main page of my site and would login the users on the forums also. You got one of those in ur pockets?
killerid is offline  
Old 08-07-2005, 12:58 AM   #6 (permalink)
Account Closed
 
vip-ip's Avatar
Join Date: Jan 2005
Location: root@localhost
Posts: 4,025
vip-ip is an unknown quantity at this point
 



So simple I even said grat instead of great oops
vip-ip is offline  
Old 08-07-2005, 09:31 AM   #7 (permalink)
Senior Member
 
Porte's Avatar
Join Date: May 2005
Location: I'm right here
Posts: 3,526
Porte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud ofPorte has much to be proud of
 



Indeed, very simple..
Thanks for writing!
__________________
WP Theme Developer
Your One-stop for Premium Magazine/CMS WordPress Themes
Deluxe Themes
Porte is offline  
Old 08-07-2005, 09:44 AM   #8 (permalink)
NamePros Regular
 
unknownz's Avatar
Join Date: Aug 2005
Posts: 727
unknownz is just really niceunknownz is just really niceunknownz is just really niceunknownz is just really niceunknownz is just really niceunknownz is just really niceunknownz is just really niceunknownz is just really nice
 



This really works!
__________________
:laugh:...::::Pakisp.net::::...-The Entertainment Pack Pakisp.net :wave:
Free Web Directory
unknownz is offline  
Old 08-07-2005, 10:04 AM   #9 (permalink)
Pro Coder & Designer
 
aween's Avatar
Join Date: Apr 2005
Location: Netherlands
Posts: 967
aween is just really niceaween is just really niceaween is just really niceaween is just really niceaween is just really niceaween is just really niceaween is just really niceaween is just really nice
 



its simple. havent tried it yet. but howd you secure the members area ?
__________________
aween web development
aween is offline  
Old 08-07-2005, 10:17 AM   #10 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer
nice and easy yes but not very secure

i would try to encorporate some kind of encryption on those passwords.
adam_uk is offline  
Old 08-07-2005, 12:00 PM   #11 (permalink)
NamePros Regular
Join Date: Jul 2005
Location: Florida
Posts: 233
TeviH is an unknown quantity at this point
 



This method only has one user id and pw, rather than individual ones for each member. Since it's not very secure, why not simply use a secure folder, created from your control panel or .htaccess?
__________________
www.headlinercreative.com
TeviH is offline  
Old 08-07-2005, 01:24 PM THREAD STARTER               #12 (permalink)
Senior Member
 
Eric's Avatar
Join Date: Mar 2005
Posts: 4,948
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
Yes, it is not secure. And only allows one id and pass.. Like I said, very very very simple I'll get into everything else later...
Eric is offline  
Old 08-07-2005, 01:27 PM   #13 (permalink)
Professional Monkey
 
Amnezia's Avatar
Join Date: Jul 2005
Location: Escaped from the zoo
Posts: 907
Amnezia has a spectacular aura aboutAmnezia has a spectacular aura about
 


Cancer Survivorship Save a Life
Originally Posted by killerid
i am looking for a login script which can be placed on main page of my site and would login the users on the forums also. You got one of those in ur pockets?

what forum software are you using?
__________________
Webmaster Words
Amnezia is offline  
Old 08-07-2005, 02:13 PM   #14 (permalink)
Account Suspended
Join Date: Jun 2005
Posts: 189
killerid is an unknown quantity at this point
 



Originally Posted by Amnezia
what forum software are you using?
Phpbb only.
killerid is offline  
Old 08-07-2005, 04:44 PM   #15 (permalink)
NamePros Expert
 
Peter's Avatar
Join Date: Nov 2003
Location: Scotland
Posts: 5,069
Peter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond reputePeter has a reputation beyond repute
 


Child Abuse Save The Children Save The Children Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009 Help The Homeless - Holiday 2009
Originally Posted by killerid
Phpbb only.
http://www.phpbb.com/kb/article.php?article_id=143
__________________
Manage your portfolio using my new Domain Portfolio Management script.
Securing Your Domain Name From Theft
Peter is offline  
Old 08-08-2005, 07:54 AM   #16 (permalink)
TWM
Web Marketing Specialist
Join Date: Oct 2003
Location: Texas, USA
Posts: 1,335
TWM is a jewel in the roughTWM is a jewel in the roughTWM is a jewel in the rough
 



Code:
<?
$user1 = "user1";
$pass1 = "pass1";
$user2 = "user2";
$pass2 = "pass2";
if ($user == $user1&&$pw == $pass1)
{
   header("Location: http://website.com/area/user1");
}
if ($user == $user2&&$pw == $pass2)
{
   header("Location: http://website.com/area/user2");
}

  else
{
   print("Wrong username or password. Please try again.");
}
?>
Just keep adding users and if statements
TWM is offline  
Old 08-08-2005, 07:57 AM   #17 (permalink)
DNOA Member
Join Date: May 2004
Posts: 5,040
mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future
 


Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
... or use MySQL <_<
mholt is offline  
Old 08-08-2005, 11:20 AM   #18 (permalink)
TWM
Web Marketing Specialist
Join Date: Oct 2003
Location: Texas, USA
Posts: 1,335
TWM is a jewel in the roughTWM is a jewel in the roughTWM is a jewel in the rough
 



if i knew how to input users and passwords
TWM is offline  
Old 08-08-2005, 11:26 AM   #19 (permalink)
DNOA Member
Join Date: May 2004
Posts: 5,040
mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future
 


Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
$query = "INSERT INTO tablename VALUES('$username', '$password')";
mysql_query($query);

that's a very simple input thing for ya - you'll need to put the stuff in VALUES() in order of the columns of the table...
mholt is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
60.000 Templates, scripts, fonts, banners etc. $9.95 atkims Web Development Wanted 19 11-16-2004 10:48 AM
Simple PHP login Script iDeviseFlash Programming 17 07-08-2004 10:01 AM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 04:44 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger