Login Script

Started on the old forum in March 2009 · view the original in the archive · old links redirect here

19 replies · 924 views · started 17 years ago · 1 min read

3 participants
Guest #1

Hi i need Login Script for my desiwap.info site..

no email confirmation..reg option.user full details.. in index showen total reg members..whos online..

pls help me..

any coder make me spaspic fit on my site.. i ready to pay for coading

subzero Super moderator Fellow · 3,954 posts #2

Do you want PHP: Sessions or just plan user and pass in the headers ??

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

Guest #3

QUOTE (subzero @ Mar 9 2009, 02:42 PM) <{POST_SNAPBACK}>

Do you want PHP: Sessions or just plan user and pass in the headers ??

need it in php bro..no probs along with sql

subzero Super moderator Fellow · 3,954 posts #4
// these files should be put in a directory named 'inc'
inc/auth.php      // the meat and potatoes of this subject
inc/connect.php // an excellent connection script
inc/nav.php     // navigation include for site

// these files should be on the web root
index.php  // main page of site
link_1.php // page of site
link_2.php // page of site
link_3.php // page of site
logout.php   // destroy session and re-direct to login

Here is the SQL Schema for the table I Query:

CREATE TABLE users (
  user_id int(10) unsigned NOT NULL auto_increment,
  username varchar(20) NOT NULL default '',
  password varchar(20) NOT NULL default '',
  PRIMARY KEY  (user_id)
) TYPE=MyISAM;

if you copy and paste these files into your favorite text editor, edit the connect.php with your mysql settings, it should work on your server if sessions are supported.

inc/auth.php

<? 

// start session 
session_start();  

// convert username and password from _POST or _SESSION 
if($_POST){ 
  $_SESSION['username']=$_POST["username"]; 
  $_SESSION['password']=$_POST["password"];   
} 

// query for a user/pass match 
$result=mysql_query("select * from users  
  where username='" . $_SESSION['username'] . "' and password='" . $_SESSION['password'] . "'"); 

// retrieve number of rows resulted 
$num=mysql_num_rows($result);  

// print login form and exit if failed. 
if($num < 1){ 
  echo "You are not authenticated.  Please login.

 
   
  <form method=POST action=index.php> 
  username: <input type=text name=\"username\"> 
  password: <input type=password name=\"password\"> 
  <input type=submit> 
  </form>"; 
   
  exit; 
} 
?>

inc/connect.php

<? 

// replace with your db info 
$hostname="localhost"; 
$mysql_login="myusername"; 
$mysql_password="mypass"; 
$database="test"; 

if (!($db = mysql_connect($hostname, $mysql_login , $mysql_password))){ 
  die("Can't connect to mysql.");     
}else{ 
  if (!(mysql_select_db("$database",$db)))  { 
    die("Can't connect to db."); 
  } 
} 
?>

logout.php

<?php

// you must start session before destroying it 
session_start(); 
session_destroy(); 

echo "You have been successfully logged out. 

 
You will now be returned to the login page. 

<META HTTP-EQUIV=\"refresh\" content=\"2; URL=index.php\"> "; 
?>

nav.php

[url="index.php>Home</a>"]link_1[/url] |  
[url="link_2.php>link_2</a>"]link_3[/url] | 
<a href=logout.php>logout</a> 

index.php

<? 

// connect to database 
include("inc/connect.php"); 

// include auth and nav 
include("inc/auth.php"); 

// begin content 
include("inc/nav.php"); 

echo "This is my home page."; 

// close mysql connection 
mysql_close(); 
?>

link_1.php

<? 

// connect to database 
include("inc/connect.php"); 

// include auth and nav 
include("inc/auth.php"); 

// begin content 
include("inc/nav.php"); 

echo "This is my Link 1."; 

// close mysql connection 
mysql_close(); 
?>

link_2.php

<? 

// connect to database 
include("inc/connect.php"); 

// include auth and nav 
include("inc/auth.php"); 

// begin content 
include("inc/nav.php"); 

echo "This is my Link 2."; 

// close mysql connection 
mysql_close(); 
?>

link_3.php

<? 

// connect to database 
include("inc/connect.php"); 

// include auth and nav 
include("inc/auth.php"); 

// begin content 
include("inc/nav.php"); 

echo "This is my Link 3."; 

// close mysql connection 
mysql_close(); 
?>

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

Guest #5

Thank u very much u brother..i try to make my site with this login script

damoon Developer · 71 posts #6

please if possible could you add a register to this script????????????????????????? please and maybe an admin panel that can automatically create users either of them is acceptable

They are Only Two types Of people In This World We Have The Binary And The Non-Binary.........

I am the Dark-Lord Saying Hello To all the Dark-Kings of the Universe Visit my site where all the Kings Meet : Dark Region

subzero Super moderator Fellow · 3,954 posts #7

You can edit most reg script mate 😉 not hard thou

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

damoon Developer · 71 posts #8

please i am awaiting your response

They are Only Two types Of people In This World We Have The Binary And The Non-Binary.........

I am the Dark-Lord Saying Hello To all the Dark-Kings of the Universe Visit my site where all the Kings Meet : Dark Region

subzero Super moderator Fellow · 3,954 posts #9

im not making a admin page ok

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

Attachments: php_loginscript.zip
damoon Developer · 71 posts #10

ok thanks i really appreciate

They are Only Two types Of people In This World We Have The Binary And The Non-Binary.........

I am the Dark-Lord Saying Hello To all the Dark-Kings of the Universe Visit my site where all the Kings Meet : Dark Region

subzero Super moderator Fellow · 3,954 posts #11

but there sign up and login there it is easy to see how it works

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

damoon Developer · 71 posts #12

ok, you are a GURU @ subzero

They are Only Two types Of people In This World We Have The Binary And The Non-Binary.........

I am the Dark-Lord Saying Hello To all the Dark-Kings of the Universe Visit my site where all the Kings Meet : Dark Region

damoon Developer · 71 posts #13

but please if possible all i need is a an admin panel that can view users account and create users!!!! just simple

: Welcome Admin to your portal

Create New Account View Active Account Delete Account Logout

Please subzero help me

They are Only Two types Of people In This World We Have The Binary And The Non-Binary.........

I am the Dark-Lord Saying Hello To all the Dark-Kings of the Universe Visit my site where all the Kings Meet : Dark Region

subzero Super moderator Fellow · 3,954 posts #14

i will make it simple not all done coding ok.

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

damoon Developer · 71 posts #15

ok thanks

They are Only Two types Of people In This World We Have The Binary And The Non-Binary.........

I am the Dark-Lord Saying Hello To all the Dark-Kings of the Universe Visit my site where all the Kings Meet : Dark Region

damoon Developer · 71 posts #16

i am waiting you @ subzero

They are Only Two types Of people In This World We Have The Binary And The Non-Binary.........

I am the Dark-Lord Saying Hello To all the Dark-Kings of the Universe Visit my site where all the Kings Meet : Dark Region

mrwhite Junior · 24 posts #17

subzero wrote: im not making a admin page ok

any one change user login with user name (not in mail id)..also with out email confirmation..

plese help me mr subzero..edit and upload new pack..pls

subzero Super moderator Fellow · 3,954 posts #18

i will make a other one 😉

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

mrwhite Junior · 24 posts #20

Subzero bro..we are waiting pls edit and upload it brother

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close