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 Please explain to me..

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 09-10-2005, 04:13 PM THREAD STARTER               #1 (permalink)
SQLdumpster.com
 
Encenta.com's Avatar
Join Date: Jun 2005
Location: West Sussex, UK
Posts: 573
Encenta.com has a spectacular aura aboutEncenta.com has a spectacular aura about
 




Please explain to me..


Hi. Please explain to me why the hell PHP is ignoring 'AND password='$password'' in the following:

PHP Code:
$query mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password'");
????: NamePros.com http://www.namepros.com/programming/122602-please-explain-to-me.html
$id=mysql_result($query,0,"id"); 
When signing into my site, I can log in with ANY password. I have looked at my database and the password is set at ONE password.
Encenta.com is offline  
Old 09-10-2005, 04:50 PM   #2 (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
Hmm, not sure, but try this instead.

PHP Code:
$query mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password'"); 
????: NamePros.com http://www.namepros.com/showthread.php?t=122602
$id mysql_query($query,0,"id"); 
Eric is offline  
Old 09-10-2005, 05:10 PM THREAD STARTER               #3 (permalink)
SQLdumpster.com
 
Encenta.com's Avatar
Join Date: Jun 2005
Location: West Sussex, UK
Posts: 573
Encenta.com has a spectacular aura aboutEncenta.com has a spectacular aura about
 




Didn't work. It must be something to do with the password check
Encenta.com 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
Things you can't explain? UFOs? Ghosts? vip-ip The Break Room 20 07-24-2005 03:51 AM
can someone explain me ? saigon Domain Newbies 3 06-16-2005 05:32 AM
Delete, could you please explain... ICQer The Break Room 25 04-13-2005 04:14 PM
Domain Sponsors? Someone explain. Eric Domain Newbies 16 04-04-2005 02:14 AM
Top Level,2nd Level,3rd Level? Please explain Dillpup Domain Newbies 4 06-06-2004 07:06 PM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 03:46 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