Web Design Forum  
 
Go Back   Web Design Forum > Web Software > Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 12-14-2011, 07:47 PM   #1
New Member
 
Join Date: Dec 2011
Posts: 15
Default PHP error--login script

I am unable to login with my script. When I click on "login", the page seems to refresh, but it does nothing besides that. The register.php works perfectly, but there seems to be something wrong with the login.php. I'm also getting some message that says, "Notice: Undefined variable: act in C:\wamp\www\youtube\login.php on line 74." But that's probably not the issue (I've had that with the register script before and it worked fine; I think that's just some warning, not an actual error).

The order of the columns in my table is id, full_name, email, username and password (if that changes anything).

Could you please help me out with this?

Here is the register.php: http://pastebin.com/tRK803AY
Here is the login.php: http://pastebin.com/1LUtsH4q

Thanks again

Oh and I'm doing this on WAMP (once again, the register.php works perfectly on it)
Alex is offline   Reply With Quote


Old 12-14-2011, 10:34 PM   #2
Silver Member
 
Join Date: Jul 2011
Posts: 146
Default

Check line 51.

Also, you haven't set a value in your code for the variable $act.
__________________
space
Orchid Technical Services
Website Design/Development and Technical Support
DesignerBill is offline   Reply With Quote
Old 12-15-2011, 03:17 AM   #3
New Member
 
Join Date: Dec 2011
Posts: 15
Default

hmm, but what could I set it to so that it works? I'm pretty sure that's the issue though
Alex is offline   Reply With Quote
Old 12-15-2011, 06:48 AM   #4
New Member
 
Join Date: Dec 2011
Posts: 2
Default

Try the isset() function.
http://php.net/manual/en/function.isset.php
yourDesigns is offline   Reply With Quote
Old 12-15-2011, 02:39 PM   #5
Silver Member
 
Join Date: Jul 2011
Posts: 146
Default

In addition to fixing line 51, you really need to add this line:
Code:
$act = $_REQUEST['act'];
__________________
space
Orchid Technical Services
Website Design/Development and Technical Support
DesignerBill is offline   Reply With Quote


Old 12-15-2011, 08:15 PM   #6
New Member
 
Join Date: Dec 2011
Posts: 15
Default

Thanks a lot everyone. Here's what it looks like now: http://pastebin.com/tPUF80SE

It seems to at least be detecting false passwords, but still doesn't login the user. strange..
Oh and I wasn't sure how to use isset in this case
Alex is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:47 AM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.