|
|
#1 |
Member
|
|
|
|
|
#3 | |
Member
|
Quote:
PHP Code:
|
|
|
|
|
#4 |
Member
Join Date: Jan 2010
Location: Germany
Posts: 5,046
|
Well do you get any output? If yes, which, if no, what path does it take through the ifs/elses?
That way you should be able to find out which line exactly causes the error (add more echos if necessary), and from there on you probably don't even have to ask us for the error... Or is there anything that prevents you from debugging it that way? Oh by the way, creating a string should not end up making the script unresponsive (if that's the error you're dealing with) as you suspected. Only the query itself has the potential for that. But again, this is just one interpretation of "it doesn't respond".
__________________
I might edit my p0sts frequently and rapidly after posting.
DotA code of the week:
Jass:
function Func0243 takes nothing returns nothing
call Func0242()
endfunction
|
|
|
|
#5 | |
Member
|
Quote:
PHP Code:
|
|
|
|
|
#6 | ||
Member
Join Date: Jun 2009
Location: Herzegovina
Posts: 693
|
You can write, for example after you do query agains db,
Quote:
I would say something is wrong with query. Try this: Quote:
|
||
|
|
|
#7 | |
Member
|
Quote:
Like I said. I am really new. Thank you so much, ill try it tomorrow. What does the '.' do infront of '.$' ? Best regards, Audacious |
|
|
|
|
#8 |
Member
|
Ok, try this.
PHP Code:
|
|
|
|
#9 | |
Member
|
Quote:
|
|
|
|
|
#10 |
Member
|
PHP Code:
|
|
|
|
#11 |
Member
Join Date: Jun 2009
Location: Herzegovina
Posts: 693
|
Can you add the html form too.
|
|
|
|
#12 | |
Member
|
Quote:
And that is when I try to put in a name and a pass - no matter if it is the right or a wrong. If I put nothing in both input boxes I get: You got the username.You got the password.You got the password_hash.You entered the ifYou must supply a username and a password. Best regards, Audacious |
|
|
||
| Last edited by Audacious; 08-24-2012 at 11:46 AM. | ||
|
|
#13 |
Member
|
The "." didn't change a thing.
But does it make you able to use HTML or are you talking about the hash tags here in the post? HTML Code:
orm action="<?php echo $current_file; ?>" method="POST"> Username: <input type="text" name="username"> Password: <input type="password" name="password"> <input type="submit" value="Log in"> </form> ?Best regards, Audacious |
|
|
|
#15 |
Member
Join Date: Jan 2010
Location: Germany
Posts: 5,046
|
The problem obviously (as already hinted some times above) comes from your query call. The error is not in your script but in the database system you are using. Are you querying your own database or is it a remote one?
__________________
I might edit my p0sts frequently and rapidly after posting.
DotA code of the week:
Jass:
function Func0243 takes nothing returns nothing
call Func0242()
endfunction
|
|
|
|
#16 |
Member
|
|
|
|
|
#17 |
Member
|
|
|
|
|
#18 |
Member
|
Hmm.... Now it says:
"Notice: Undefined variable: query_run in C:\xampp\htdocs\loginform.inc.php on line 12 Notice: Undefined variable: query_run in C:\xampp\htdocs\loginform.inc.php on line 14 Warning: mysql_num_rows() expects parameter 1 to be resource, null given in C:\xampp\htdocs\loginform.inc.php on line 14 Invalid username/password combination." Line 14 is: "$query_num_rows = mysql_num_rows($query_run);" ---------------------------------------- I only have 1 user, at as far as I can understand from the warning, it seems like my user is on row 0 ? Or am I wrong? I thought my first user would be on row 1 ? Right? |
|
|
|
#19 |
Member
Join Date: Jan 2010
Location: Germany
Posts: 5,046
|
Erios got it wrong, you had it right (you need to assign the result of the query to the query_run variable, not check them against each other).
Your code should look something like this: PHP Code:
__________________
I might edit my p0sts frequently and rapidly after posting.
DotA code of the week:
Jass:
function Func0243 takes nothing returns nothing
call Func0242()
endfunction
|
|
|
|
#20 | |
Member
|
Quote:
So I should echo "$result = mysql_store_result($query_run)" ? |
|
|