Old 12-11-2005   #1 (permalink)
Registered User
 
Join Date: Dec 2005
Posts: 4

Member script question not in FAQ.

First of all, thanks for this great great tutorial, it works, I couldn't believe it when I got the activation code, tip top stuff like we say here...

I've got a rather simple question I hope....supposing I don't want them to have a username but use their email address as a log in how would one go about doing this? I guess the database script that we started with would have to be changed?

After they log in successfully how can I direct them to a page I want? I don't want them directed to members.php or better yet, I don't want them staying there, as soon as everything it's successful I want them to be kicked back to a page I want or if it's not to complex, the page they were looking at before they decided to log in.

I luv this tutorial, it's almost like a script the way it worked like a charm, I wish I discovered it weeks ago not when I got 2 days to my php deadline project.

Thank you.
London is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 12-11-2005   #2 (permalink)
code anyone?
 
scrowler's Avatar
 
Join Date: Feb 2004
Location: New Zealand
Posts: 590

Send a message via MSN to scrowler Send a message via Skype™ to scrowler
Quote:
First of all, thanks for this great great tutorial, it works, I couldn't believe it when I got the activation code, tip top stuff like we say here...
thanks alot glad you liked it

Quote:
I've got a rather simple question I hope....supposing I don't want them to have a username but use their email address as a log in how would one go about doing this? I guess the database script that we started with would have to be changed?
yes, very simple!

http://www.biorust.com/tutorials/detail/116/us/ - login.php

PHP Code:
$query mysql_query("SELECT * FROM Users WHERE Username = '$username' AND Password = '$password' LIMIT 1") or die(mysql_error()); 
simply change to this:

PHP Code:
$query mysql_query("SELECT * FROM Users WHERE Email = '$username' AND Password = '$password' LIMIT 1") or die(mysql_error()); 
note: there may be some implications with this further on in the script e.g. closing your account etc, but this is a simple way to do what you want to do. if you wanted your entire script based around emails instead of usernames you would just have to strip the username instances out of everything and replace them with emails, or just remove them and leave email fields there. the database would have to be changed yes.

Quote:
After they log in successfully how can I direct them to a page I want? I don't want them directed to members.php or better yet, I don't want them staying there, as soon as everything it's successful I want them to be kicked back to a page I want or if it's not to complex, the page they were looking at before they decided to log in.
simple again!

(same page, login.php):

PHP Code:
 header("Location: member.php"); 
change "member.php" to whatever you want

Quote:
Thank you.
no problem
__________________
BioRUST Tutorials - the birthplace
scrowler is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 12-11-2005   #3 (permalink)
Registered User
 
Join Date: Dec 2005
Posts: 4

Thank you Scrowler, I sincerely appreciate this.
London is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 12-11-2005   #4 (permalink)
code anyone?
 
scrowler's Avatar
 
Join Date: Feb 2004
Location: New Zealand
Posts: 590

Send a message via MSN to scrowler Send a message via Skype™ to scrowler
no problem, i'll look into this a bit further at some stage and find if there are any further implications in simply doing what i said, and then put it up on the FAQ incase anyone else is wondering
__________________
BioRUST Tutorials - the birthplace
scrowler is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 12-11-2005   #5 (permalink)
Registered User
 
Join Date: Dec 2005
Posts: 4

Yeah, I'll go thru all the files and see since that code appears a few times... look at the database script...

PHP Code:
CREATE TABLE `Users` (
`
idint(11NOT NULL auto_increment,
`
Usernametext NOT NULL,
`
Passwordvarchar(32NOT NULL default '',
`
Nametext NOT NULL,
`
Emailtext NOT NULL,
`
Datetext NOT NULL,
`
IPtext NOT NULL,
`
Actkeyvarchar(40NOT NULL default '',
`
Activatedint(1NOT NULL default '0',
PRIMARY KEY (`id`)

If I take out the username part, would that fix it? `Username` text NOT NULL, since I don't need that, only their email...and I know I saw one or 2 parts where it made references to "username can't be the same", I guess I'd adjust those files too...sorry to be bothering you.
London is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 12-11-2005   #6 (permalink)
code anyone?
 
scrowler's Avatar
 
Join Date: Feb 2004
Location: New Zealand
Posts: 590

Send a message via MSN to scrowler Send a message via Skype™ to scrowler
if you take out the username column, make sure you also take out any part of the script that uses that column otherwise you will get ALOT of errors from php!
__________________
BioRUST Tutorials - the birthplace
scrowler is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 01-04-2006   #7 (permalink)
Registered User
 
psychophat's Avatar
 
Join Date: Dec 2005
Posts: 5

Send a message via ICQ to psychophat Send a message via MSN to psychophat
Question

Scrowler, can your "A Complete Membership System" be integrated with the database of the forums such as SMF, gallery like coppermine and alike so that there would only be one login area for all?
__________________
Wake up . . . time to die !!!
psychophat is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ: A Complete Membership System scrowler BioRUST Specific Threads 13 01-18-2007 11:16 PM
Easy Script Space Cowboy HTML / PHP / ASP / JS 3 06-13-2005 08:48 PM
question about membership package davehaz HTML / PHP / ASP / JS 3 05-08-2005 05:11 PM
Simple Member script help? ViciOuS HTML / PHP / ASP / JS 17 04-15-2005 10:42 PM


All times are GMT +1. The time now is 07:28 AM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2007 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT