User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 401,624 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,857 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 359 | Replies: 8
Reply
Join Date: Oct 2006
Posts: 88
Reputation: dami06 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dami06 dami06 is offline Offline
Junior Poster in Training

Help logging in problem

  #1  
Feb 2nd, 2008
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, 5 views)
File Type: php login_check.php (2.0 KB, 5 views)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 239
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: logging in problem

  #2  
Feb 2nd, 2008
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
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Oct 2006
Posts: 88
Reputation: dami06 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dami06 dami06 is offline Offline
Junior Poster in Training

Re: logging in problem

  #3  
Feb 2nd, 2008
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.
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 239
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: logging in problem

  #4  
Feb 2nd, 2008
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.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Oct 2006
Posts: 88
Reputation: dami06 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dami06 dami06 is offline Offline
Junior Poster in Training

Re: logging in problem

  #5  
Feb 2nd, 2008
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?
Reply With Quote  
Join Date: Oct 2006
Posts: 88
Reputation: dami06 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dami06 dami06 is offline Offline
Junior Poster in Training

Re: logging in problem

  #6  
Feb 2nd, 2008
ok may be i'll try and create a new login in page from scratch.thank you for your time
Reply With Quote  
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation: nav33n has a spectacular aura about nav33n has a spectacular aura about 
Rep Power: 8
Solved Threads: 239
nav33n's Avatar
nav33n nav33n is offline Offline
Posting Sensei

Re: logging in problem

  #7  
Feb 2nd, 2008
Originally Posted by dami06 View Post
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..
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

*PM asking for help will be ignored*
Reply With Quote  
Join Date: Jan 2008
Posts: 55
Reputation: Walkere is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 5
Walkere Walkere is offline Offline
Junior Poster in Training

Re: logging in problem

  #8  
Feb 3rd, 2008
Originally Posted by dami06 View Post
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
Reply With Quote  
Join Date: Oct 2006
Posts: 88
Reputation: dami06 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dami06 dami06 is offline Offline
Junior Poster in Training

Re: logging in problem

  #9  
Feb 4th, 2008
thanks a lot walkere, im checking the the link out now
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 5:47 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC