php mysql help

Reply

Join Date: Mar 2005
Posts: 12
Reputation: androstendione is an unknown quantity at this point 
Solved Threads: 0
androstendione androstendione is offline Offline
Newbie Poster

Re: php mysql help

 
0
  #21
Mar 5th, 2005
it now gives this error


Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@hotmail.com and StudentPassword = astra123' at line 1 Whole query: SELECT Student ID FROM mmstudents where StudentEmailAddress = chris@hotmail.com and StudentPassword = astra123
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 355
Reputation: DanceInstructor is an unknown quantity at this point 
Solved Threads: 14
DanceInstructor's Avatar
DanceInstructor DanceInstructor is offline Offline
Posting Whiz

Re: php mysql help

 
0
  #22
Mar 7th, 2005
Bah. I had typed Student ID instead of StudentID, don't know if you caught that or not. Anyways try the options below, or have you already got it working?

[PHP]
$query = "SELECT StudentID FROM mmstudents where StudentsEmailAddress = '{$_POST['EmailAddress']}' and StudentPassword = '{$_POST['Password']}'";
[/PHP]


or:
[PHP]
$query = "SELECT StudentID FROM mmstudents where StudentsEmailAddress = " . "'" . "{$_POST['EmailAddress']}" . "'" . " and StudentPassword = " . "'" . "{$_POST['Password']}" . "'";
[/PHP]

Dance
Clear Mind Hosting and Web Design

If I've helped you please consider adding to my reputation.
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 12
Reputation: androstendione is an unknown quantity at this point 
Solved Threads: 0
androstendione androstendione is offline Offline
Newbie Poster

Re: php mysql help

 
0
  #23
Mar 10th, 2005
tried both of those edited the typos ie student instead of students ..now all the page does is posts back on itself..no error message...the code is designed to show the error message student not found...yet it doesnt it now just posts back onitself as if this was the first time entering the page..

very strange
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC