|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
User Log in
Oh no, russ has another problem....sorry guys. Anyone know any decent user login tutorials? and a comments tutorial too?
|
|
#2
|
|||
|
|||
|
RE: User Log in
Ive seena comments tutorial somewhere, ill try and find u it again.
With a login tutorial, try www.hotscripts.com then go to php>>user authentication |
|
#4
|
|||
|
|||
|
RE: User Log in
lol Evi..
|
|
#5
|
|||
|
|||
|
RE: User Log in
hey guys, thanks for your help. I found one at phpbeginner. but when I add this to my script
setcookie ("ck_user", ""); setcookie ("ck_password", ""); setcookie ("ck_user_id", ""); i get this error Warning: Cannot add header information - headers already sent by (output started at /home/gmflp/public_html/main.php:3) in /home/gmflp/public_html/scripts/head.php on line 31 |
|
#7
|
|||
|
|||
|
RE: User Log in
Cheers man
|
|
#8
|
|||
|
|||
|
RE: User Log in
okay, another error, after I submit the form, I get this error
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/gmflp/public_html/test.php on line 76 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/gmflp/public_html/test.php on line 78 that is on this line |
|
#9
|
|||
|
|||
|
RE: User Log in
im pretty sure that means theres an error in your SQL syntax.
do this: that should get you your problem |
|
#10
|
|||
|
|||
|
RE: User Log in
ditto.
line 76: $num_rows = mysql_num_rows($result); line 78: $row = mysql_fetch_array($result); What do these two lines have in common? tic-toc A: $result The error msg reads "supplied argument is not a valid MySQL result resource". What is the supplied argument? A: $result What is $result? A variable. That is most likely assigned the value mysql_query($query) So mysql_query() did _NOT_ return a valid MySQL result resource. Why not? Probably, 9 out of 10 times, is because $query is not a properly formatted SQL statement or some indicies your trying to collect are not legit. So even though the error is on line 76 and 78, the problem is before that ... probably line 74. Good luck. PS ... it is good practice to run your queries in your mysql client to writing them in code. |
|
#11
|
|||
|
|||
|
RE: User Log in
okay, I have got it narrowed down to this now
MySQL said: You have an error in your SQL syntax near '$sql = "SELECT id " . "FROM membersdb " . "WHERE use' at line 1 I personally can't see anything wrong with it. I think I might be the word sql, but I've tried numbering it and stuff, and its just not working, I find this wierd as this is the code in the tutorial |
|
#12
|
|||
|
|||
|
RE: User Log in
Am not good wit sql but try:
'$sql = "SELECT id" ; ."FROM membersdb" ; ."WHERE USE" at line 1'; |
|
#13
|
|||
|
|||
|
RE: User Log in
for mysql queries use:
$result=mysql_query("SELECT id FROM membersdb WHERE yourwheresyntax") |
|
#14
|
|||
|
|||
|
RE: User Log in
Russ,
When you execute a query using your mysql client, just send the sql statement. For example, SELECT id FROM memberdb. It looks like you tried diving it some PHP code ... $sql = SELECT id from membersdb. Which, as you can, mysql will not understand it and send you an error msg. HTH |
|
#15
|
|||
|
|||
|
RE: User Log in
okay guys, I got it right this time, I had to number the result var
|