Re: [PHP] login problem

2006-06-26 Thread kartikay malhotra
Dear SK, alternately, close previously opened A/C and allow current one. this is similar to wat yahoo messenger does and is a good safety measure. 1. If u use this technique, ur problem of shutdown would be solved. 2. Alternately, maintain sessions (using session ID) in PHP. 2a. Or just monito

Re: [PHP] login problem

2006-06-24 Thread kartikay malhotra
strange problem, but very similar to links in linux. you must be maintaining a database or a record file. u can maintain all links ('users' as u put it) for a given user. if a user logs in through any of his accounts, check if he/she is logged in another A/C and stop this one. else, allow log-in

[PHP] login problem

2006-06-23 Thread suresh kumar
Hi, I am facing one problem.i previously mailed ,but there is no response,its running out of time.i want to implement that logic as soon as possible.This is my problem We are developing an online software for displaying ads in big mall.I want to restrict only one user

Re: [PHP] re:[PHP] login problem fixed!!

2004-03-25 Thread Richard Davey
Hello Andy, Thursday, March 25, 2004, 5:45:52 PM, you wrote: AB> PHP Version 4.0.4pl1 Wow, that's an old version of PHP! It could be the cause of this, there's nothing in you phpinfo to give anything else away (i.e. it's identical to mine). -- Best regards, Richard Davey http://www.phpcommun

[PHP] re:[PHP] login problem fixed!!

2004-03-25 Thread Andy B
"Absolutely fascinating, I have never seen a MySQL server behave like this. Could you post which version of MySQL you're using and perhaps the MySQL part of phpinfo()? There must be something *somewhere* that controls this behaviour." PHP Version 4.0.4pl1 Linux noir.propagation.net 2.0.36 #5 Wed D

Re: [PHP] re:[PHP] login problem fixed!!

2004-03-25 Thread Richard Davey
Hello Andy, Thursday, March 25, 2004, 1:17:54 PM, you wrote: AB> yup and believe it or not if($result) only returns true if a valid AB> username/password row can be found otherwise it returns a non existing AB> resource Absolutely fascinating, I have never seen a MySQL server behave like this. C

[PHP] re:[PHP] login problem fixed!!

2004-03-25 Thread Andy B
"if ($result) { echo "Valid user"; } else { echo "Error?"; } ?> -- End here -- Now if what you're saying is correct, the final "if result()" block should only print "valid user" if the user exists in the database, right?" yup and b

Re: [PHP] re:[PHP] login problem fixed!!

2004-03-25 Thread Richard Davey
Hello Andy, Thursday, March 25, 2004, 11:57:09 AM, you wrote: AB> SELECT COUNT(username) AS hits FROM users WHERE ..." AB> dont know because then how would i verify that the valid user was logged in AB> or if they typed the wrong stuff in?? Because it works like this: SELECT COUNT(username) AS

[PHP] re:[PHP] login problem fixed!!

2004-03-25 Thread Andy B
"Do you actually need to bring back the user data? What I mean is, you're selecting * from the users table and doing nothing with it other than worrying if the query was successful or not." ops!! I forgot to mention that the username is used elsewhere in a different file somewhere (to verify the s

Re: [PHP] re:[PHP] login problem fixed!!

2004-03-25 Thread Richard Davey
Hello Andy, Thursday, March 25, 2004, 10:43:54 AM, you wrote: AB> So, just for the sake of me getting this right, it would be better code if i AB> had the code like this: AB> $UserExists=mysql_query("select * from users where AB> username='$_POST[username]' and pwd=md5($_POST[password])"); AB>

[PHP] re:[PHP] login problem fixed!!

2004-03-25 Thread Andy B
So, just for the sake of me getting this right, it would be better code if i had the code like this: forgive the odd severely long redundant example names but... im sure that is better than what i had before... let me know if i got the right idea... and $UserExists in this example is either tr

Re: [PHP] login problem fixed!!

2004-03-25 Thread Mikael Almstedt
Just testing to see if this works. Sorry =) "Mike Ford" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > On 25 March 2004 09:32, Andy B wrote: > > > the final line then is: if($result==false) {//test the query > > itself..if false then > > print whatever > > } else {//if it did wo

Re: [PHP] RE:[PHP] login problem fixed!!

2004-03-25 Thread Richard Davey
Hello Andy, Thursday, March 25, 2004, 9:53:05 AM, you wrote: AB> um?? this way doesnt work for some strange reason... testing AB> affected_rows returns always with 0 so: AB> if(mysql_affected_rows()==0){...} It depends on your query. If you are doing a SELECT query then you cannot use affect

RE: [PHP] login problem fixed!!

2004-03-25 Thread Ford, Mike [LSS]
On 25 March 2004 09:32, Andy B wrote: > the final line then is: if($result==false) {//test the query > itself..if false then > print whatever > } else {//if it did work then do this...} > > but of course it could always be turned around to: > if($result==true) {...} but dont know what way is bet

[PHP] RE:[PHP] login problem fixed!!

2004-03-25 Thread Andy B
[snip] please note this will only catch invalid queries. To catch the event of the query being perfectly fine, but nothing coming back, just check the values of num_rows or affected_rows (depending on the query). [/snip] um?? this way doesnt work for some strange reason... testing affected_ro

Re: [PHP] login problem fixed!!

2004-03-25 Thread Richard Davey
Hello Andy, Thursday, March 25, 2004, 9:32:12 AM, you wrote: AB> but of course it could always be turned around to: AB> if($result==true) {...} but dont know what way is better or if it AB> is a personal choice... A better solution might be to check if a MySQL error has been raised - please note

[PHP] login problem fixed!!

2004-03-25 Thread Andy B
hi!! tnx for the help with that huge problem... got it running and this is how... the query ...username='...' and pwd=md5(...) was in "" and i guess when you have something like that putting '' in an index name is illegal?? can somebody explain why? and on the line: if(.) {... num_of_rows(

RES: [PHP] login problem [solved]

2003-03-17 Thread Gilberto Garcia Jr.
It was a cookie problem. between php and windows. thanks -Mensagem original- De: Chris Hewitt [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 17 de março de 2003 11:45 Para: Gilberto Garcia Jr. Cc: PHP Assunto: Re: [PHP] login problem Gilberto Garcia Jr. wrote: >Hi guys. &g

Re: [PHP] login problem

2003-03-17 Thread Chris Hewitt
Gilberto Garcia Jr. wrote: Hi guys. Im having a problem with a login system. I enter with the correct password and I press the submit button. But, nothing happens. Its not a typinh mistake, cause when i enter the wrong pass. it returns me an error. What this can be??? You would need to tell us a

[PHP] login problem

2003-03-17 Thread Gilberto Garcia Jr.
Hi guys. I´m having a problem with a login system. I enter with the correct password and I press the submit button. But, nothing happens. It´s not a typinh mistake, cause when i enter the wrong pass. it returns me an error. What this can be??? thanks --- Outgoing mail is certified Virus Free. Ch