943,691 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 828
  • PHP RSS
Feb 2nd, 2008
0

logging in problem

Expand Post »
Hi,
I'm trying to create a little web page but when i try to log in using the username and password i put in MySQL database it doesn't do anything at all.which is when i click login it just goes blank. I don't know why this is. Could you please take a look at my login.php and login_check.php code that i have attached to this mail to see if I did anything wrong or I didn't put something. I'm using php and MySQL. Thank you
Attached Files
File Type: php login.php (2.9 KB, 9 views)
File Type: php login_check.php (2.0 KB, 10 views)
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
dami06 is offline Offline
90 posts
since Oct 2006
Feb 2nd, 2008
0

Re: logging in problem

Since you are using classes in your script, its kinda difficult to make out what it does. (fetch_GET, fetch_POST, authenticator, etc. ). The best way to debug your code would be to print or echo messages to check the flow of your script. You can use print_r($_POST) in login_check.php to see if all the variables are posted properly. You can echo your sql statements( i dont see any!) and execute it to see if it returns a resultset. You can use die function to get mysql error message. And also, check for 'unwanted' exit keyword.

Cheers,
Naveen
Moderator
Featured Poster
Reputation Points: 524
Solved Threads: 356
Purple hazed!
nav33n is offline Offline
3,878 posts
since Nov 2007
Feb 2nd, 2008
0

Re: logging in problem

hi,
to be honest. I'm a beginner at php and someone actually helped me out with that code (wrote it for me, but the person is unavailable now) . As someone who doesn't really know programming, what do you think i can do with the code for it to work. Is it possible to tell me what to type down in my code.. Any help would be really appreciated. thank you.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
dami06 is offline Offline
90 posts
since Oct 2006
Feb 2nd, 2008
0

Re: logging in problem

hmm.. Since you are a beginner, I dont think you will understand OOPS concepts if you have no idea about it. You can either start learning OOPS concepts like classes, objects, then make your code work OR wait for the one who helped you create this code to make it work OR create a new login page from the scratch.
Moderator
Featured Poster
Reputation Points: 524
Solved Threads: 356
Purple hazed!
nav33n is offline Offline
3,878 posts
since Nov 2007
Feb 2nd, 2008
0

Re: logging in problem

and if i may add. when i type in the username and password and click on login it. It takes me to localhost/capat/login_check.php and then just produces this

?>

does this help in anyway?
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
dami06 is offline Offline
90 posts
since Oct 2006
Feb 2nd, 2008
0

Re: logging in problem

ok may be i'll try and create a new login in page from scratch.thank you for your time
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
dami06 is offline Offline
90 posts
since Oct 2006
Feb 2nd, 2008
0

Re: logging in problem

Click to Expand / Collapse  Quote originally posted by dami06 ...
and if i may add. when i type in the username and password and click on login it. It takes me to localhost/capat/login_check.php and then just produces this

?>

does this help in anyway?

?> ? I guess you have php ending tags somewhere in your html. Anyways, All the best..
Moderator
Featured Poster
Reputation Points: 524
Solved Threads: 356
Purple hazed!
nav33n is offline Offline
3,878 posts
since Nov 2007
Feb 3rd, 2008
0

Re: logging in problem

Click to Expand / Collapse  Quote originally posted by dami06 ...
ok may be i'll try and create a new login in page from scratch.thank you for your time
That would be your best bet. It's particularly hard to help someone that doesn't understand the code at all - so I would always suggest learning the basics before you try and implement someone else's script.

If you're looking for a resource to learn php, check out Practical PHP Programming. It's a great, free book - the same one I used to learn a while back.

Good luck,
- Walkere
Reputation Points: 29
Solved Threads: 5
Junior Poster in Training
Walkere is offline Offline
57 posts
since Jan 2008
Feb 4th, 2008
0

Re: logging in problem

thanks a lot walkere, im checking the the link out now
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
dami06 is offline Offline
90 posts
since Oct 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Malicious website attacks and how to counter them?
Next Thread in PHP Forum Timeline: uploading files





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC