This is a discussion on "Login Script... something wrong!" within the PHP Forum section. This forum, and the thread "Login Script... something wrong! are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Login Script... something wrong!
|
||
| Notices |
![]() |
|
|
LinkBack (1) | Thread Tools |
#1
|
|||
|
|||
|
Login Script... something wrong!
Hi!
Okay, first of all, I'm a beginner of PHP... I've thought of a login script for my site, it begins with a form where one has to fill in username and password, and the action file of this form is the following (user authentication is done with a flat file):
I guess it is easy for you to find the error, please be patient, I'm really a beginner!! Thanks in advance if you can help! Last edited by snowangel; Mar 2nd, 2006 at 19:25. |
|
|
|
#2
|
|||
|
|||
|
Re: Login Script... something wrong!
What are the contents of the file?
As far as I can tell the problem is that you are treating the file contents as if they are an array, and as far as I cant tell you have not done anything to convert the data your loading into an array. |
|
#3
|
|||
|
|||
|
Re: Login Script... something wrong!
Contents of the file:
print_r($filecontents):
|
|
#4
|
|||
|
|||
|
Re: Login Script... something wrong!
Well, looks like you have done everything correctly...
I'm going to guess the problem is with the if statement. put something like this before the if statment, so you can compair the two varables yourself.
"pass1 " Where it has a line break after it. Other then the varable not being equal... I can't figure out what might be wrong. |
|
#5
|
|||
|
|||
|
Re: Login Script... something wrong!
Okay, good idea!
This is the output I get:
|
|
#6
|
|||
|
|||
|
Re: Login Script... something wrong!
No idea, but check out trim() it should be able to fix your problem.
|
|
#7
|
|||
|
|||
|
Re: Login Script... something wrong!
Okay, stupid question, but I don't know all the functions, anyway, thanks!
It's working!!! Perfectly!!! I love you guys, thank you so much for being so patient and helping soooo much!! |
![]() |
| Tags |
| login, script, wrong |
| Thread Tools | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://webforumz.com/php-forum/5521-login-script-something-wrong.htm
|
||||
| Posted By | For | Type | Date | |
| html login script | This thread | Refback | Sep 12th, 2006 12:39 | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP Login Script / form | prydie | PHP Forum | 0 | Mar 27th, 2008 06:55 |
| login script | mbarr | Databases | 13 | Mar 12th, 2008 03:39 |
| Login Script Problem | Aaron1988 | PHP Forum | 5 | Nov 20th, 2006 06:15 |
| login script help | Aaron1988 | PHP Forum | 2 | Oct 25th, 2006 15:03 |
| My first PHP script - what's wrong with it? | Hudba | PHP Forum | 1 | Jan 30th, 2006 01:53 |