| | |
php mysql help
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Mar 2005
Posts: 12
Reputation:
Solved Threads: 0
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
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
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
[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
•
•
Join Date: Mar 2005
Posts: 12
Reputation:
Solved Threads: 0
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
very strange
![]() |
Similar Threads
- Looking for PHP / MySQL Developer (Web Development Job Offers)
- Looking for a PHP/MYSQL Programmer (Web Development Job Offers)
- Need Highly Experienced PHP/MySQL Programmer $15-$25/hour (Web Development Job Offers)
- PHP/MySQL Programmer Position (Web Development Job Offers)
Other Threads in the PHP Forum
- Previous Thread: USB device command
- Next Thread: Creating linked pages
| Thread Tools | Search this Thread |
# 5.2.10 ajax apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date display dissertation dynamic echo echo$_get[x]changingitintovariable... email error file files folder form forms function functions google href htaccess html image images include insert integration ip java javascript joomla ldap legislation limit link local login loop mail memberships menu mlm multiple multipletables mysql mysqlquery oop open paypal pdf persist php problem query radio random recursion regex remote rss script search server sessions sms soap sockets source space spam sql syntax system table tutorial update upload url validator variable video web xml youtube





