I got the following error:
You have an error in your SQL syntax near ')' at line 1
is this an error in my php code or in my mysql database?
Thanks
Rainthat's probably just a typo in the query in your PHP.yup your code is wrong. I bet you missed a variable at the end or you forgot a )
post your code here so we can see.$sql = "select id, login, LEVEL from `admins` where login = '$_POST[login]' AND PASSWORD = '$_POST[pass]')"; //creates the querry
I found it... should be '$_POST[pass]'";!!!!!!
*slaps self in face*
Thanks
Rainnow I'm getting this error...
Warning: Cannot modify header information - headers already sent by (output started at /admin/admin_panel.php:7) in /admin/admin_panel.php on line 308
and line 308 looks like this...
header("Location: ../admin.php?a=nologinfound");
any ideas?
Thanks
Rainthat doesn't tell you anyhting. what is line 7 of the admin_panel.php?Warning: Cannot modify header information - headers already sent by (output started at /admin/admin_panel.php:7) in /admin/admin_panel.php on line
u cant send any output to the browser before u use header function (not even a blank space).
use the header function at very top of ur php file and that error shd go.
tontoohhh ok
Thanks
Rain
You have an error in your SQL syntax near ')' at line 1
is this an error in my php code or in my mysql database?
Thanks
Rainthat's probably just a typo in the query in your PHP.yup your code is wrong. I bet you missed a variable at the end or you forgot a )
post your code here so we can see.$sql = "select id, login, LEVEL from `admins` where login = '$_POST[login]' AND PASSWORD = '$_POST[pass]')"; //creates the querry
I found it... should be '$_POST[pass]'";!!!!!!
*slaps self in face*
Thanks
Rainnow I'm getting this error...
Warning: Cannot modify header information - headers already sent by (output started at /admin/admin_panel.php:7) in /admin/admin_panel.php on line 308
and line 308 looks like this...
header("Location: ../admin.php?a=nologinfound");
any ideas?
Thanks
Rainthat doesn't tell you anyhting. what is line 7 of the admin_panel.php?Warning: Cannot modify header information - headers already sent by (output started at /admin/admin_panel.php:7) in /admin/admin_panel.php on line
u cant send any output to the browser before u use header function (not even a blank space).
use the header function at very top of ur php file and that error shd go.
tontoohhh ok
Thanks
Rain