General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 17th, 2003, 11:45 PM
Bruski Bruski is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Toronto, Canada
Posts: 192 Bruski User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Login

i have a login system and when the user logs in the name sticks as something like Bill not BILL thats in the database...how can i make it so the name in the database has to match with the name they are logging in as =]...thx again...is it somethin along the lines of isset and etc?

Reply With Quote
  #2  
Old October 18th, 2003, 12:53 AM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 788 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 7
I don't understand what you are after... could you reword that.
__________________
__________________________________________________ _
Wil Moore III, MCP | Integrations Specialist | Senior Consultant
Are You Listed...? | DigitallySmooth Inc.

Reply With Quote
  #3  
Old October 18th, 2003, 12:58 AM
Bruski Bruski is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Toronto, Canada
Posts: 192 Bruski User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
on my login right now the user can login as BILL or BiLL or Bill or biLL and still login as the correct user, how can i make it so that his database name has to match with the name typed in for them to get access, or when they type in BILL or Bill etc, to automatically cahnge the displayname to Bill ( if thatswhat is in the database) hope that helps

Reply With Quote
  #4  
Old October 18th, 2003, 11:41 AM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 788 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 7
Yes, thank you; that does make a lot more sense now.
Essentially a couple things could be happening.

1. Your login form has a Javascript event attached to it that is either changing the value of the login name to uppercase or lowercase, then submitting...

or more likely

2. The code that validates a user's login is matching the input from the user to the value in the database with both values being converted to lowercase or uppercase.

I suggest you do a quick search over all your code that looks for the functions: 'strtolower' or 'strtoupper'

Take out the function strtoupper or strtolower and you should be matching correctly.

Reply With Quote
  #5  
Old October 18th, 2003, 12:05 PM
Bruski Bruski is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Toronto, Canada
Posts: 192 Bruski User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
nope got none of that =[...just basic form then takes info from form and looks it up against the database

then it displays the users name, as whatever they logged in as...

Reply With Quote
  #6  
Old October 18th, 2003, 02:59 PM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 788 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 7
What does the database query look like?

Reply With Quote
  #7  
Old October 18th, 2003, 04:13 PM
Bruski Bruski is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Toronto, Canada
Posts: 192 Bruski User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
heres my code

PHP Code:
 session_start();
header("Cache-control: private");
mysql_connect("localhost","bruski","alex1387");
mysql_select_db("bruski_school") or die("could not select db");

if (
$username && $password)
{
  
// if the user has just tried to log in
  
$query "select * from users "
           
."where username='$username' "
           
." and passwd='$password' ";
  
$result mysql_query($query);
  
$row mysql_fetch_assoc($result);
  if (
mysql_num_rows($result) >0)
  {
    
// if they are in the database register the user id
    
    
$valid_user $username;
    
$_SESSION['valid_user'] = $valid_user;
    
$_SESSION['pass'] = $_POST['password'];
    
$_SESSION['grade']=$row['grade'];
    
$_SESSION['country']=$row['country'];
    
$_SESSION['auth_level'] = $row["auth_level"];
    
$_SESSION['id'] = $row['id'];
     }
}
//end of section
?> 


hope that helps...its basic forms to get the information

Reply With Quote
  #8  
Old October 20th, 2003, 05:16 PM
Bruski Bruski is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Toronto, Canada
Posts: 192 Bruski User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
anyone =[

Reply With Quote
  #9  
Old October 20th, 2003, 06:16 PM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 788 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 7
Is you login form submitting GET or POST?

Reply With Quote
  #10  
Old October 20th, 2003, 06:19 PM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 788 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 7
Above your login code paste the following code (cheap debuggin):
PHP Code:
print '<pre>';
print_r$_POST );
print_r$_GET );
exit(
'</pre>'); 

Reply With Quote
  #11  
Old October 20th, 2003, 08:00 PM
Bruski Bruski is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Toronto, Canada
Posts: 192 Bruski User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
didnt work =[

Reply With Quote
  #12  
Old October 20th, 2003, 08:10 PM
Bruski Bruski is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Toronto, Canada
Posts: 192 Bruski User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
damn im stupid...i made the $valid_user = to the $username that is being taken from the textfield...damn i fixed it by getting it from the database, sorry for the trouble, thx for still putting up with me...

Reply With Quote
  #13  
Old October 21st, 2003, 08:50 AM
mwichmann4 mwichmann4 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 81 mwichmann4 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 59 m 27 sec
Reputation Power: 6
try a different query

Try querying the db but have the password queried in binary. This will return a 0 or 1 which will either return records or none.
__________________
Nothing is Everything

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Login


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |