Webmasterpals  

Go Back   Webmasterpals > Webmasterpals Network > PHP Login Script Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 05-20-2009, 04:01 PM
jmann1 jmann1 is offline
Junior Member
 
Join Date: May 2009
Posts: 3
jmann1 is on a distinguished road
Default PHP Errors

Nice script so far! I have a few issues that are not affecting functionality, but may be a little troublesome for those who have enabled error display.

On the main login screen, there are two messages:

Notice: Undefined index: email in C:\WAMP\www\login.php on line 4
Notice: Undefined index: Submit in C:\WAMP\www\login.php on line 6

and..

After logging in, on the Settings page:

Notice: Undefined index: Submit in C:\WAMP\www\settings.php on line 11

I'm sure this is an easy fix, but like most others here, I'm no PHP expert.

Regards..
Reply With Quote
  #2  
Old 05-20-2009, 06:38 PM
pbu's Avatar
pbu pbu is offline
Administrator
 
Join Date: Feb 2008
Location: hrwebdir.org
Posts: 1,077
pbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond repute
Default Re: PHP Errors

weird error! have you checked for php tags, single quotes etc..
Reply With Quote
  #3  
Old 05-20-2009, 08:04 PM
jmann1 jmann1 is offline
Junior Member
 
Join Date: May 2009
Posts: 3
jmann1 is on a distinguished road
Default Re: PHP Errors

Quote:
Originally Posted by pbu View Post
weird error! have you checked for php tags, single quotes etc..
I managed to get the first error to go away by moving the variable definition '$user_email' inside the 'if' statement just below it.

I still can't get either of the 'Submit' errors to go away though.


All the php tags appear to be in the right places.

The script is right out of the box. Other than what I mentioned above, I've made no changes.
Reply With Quote
  #4  
Old 05-21-2009, 05:08 PM
jmann1 jmann1 is offline
Junior Member
 
Join Date: May 2009
Posts: 3
jmann1 is on a distinguished road
Default Re: PHP Errors

-- SOLVED --

Add '@' in front the '$' in any lines containing "if ($_POST['Submit']=='<button text>').

For example: "if (@$_POST['Submit']=='Change')" or "if (@$_POST['Submit']=='Submit')"
Reply With Quote
  #5  
Old 05-21-2009, 07:21 PM
pbu's Avatar
pbu pbu is offline
Administrator
 
Join Date: Feb 2008
Location: hrwebdir.org
Posts: 1,077
pbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond reputepbu has a reputation beyond repute
Default Re: PHP Errors

great job
Reply With Quote
  #6  
Old 05-12-2010, 04:48 PM
ledenjes ledenjes is offline
Junior Member
 
Join Date: May 2010
Posts: 8
ledenjes is on a distinguished road
Default Re: PHP Errors

If you get these kind of errors in your pages (mainly on your local server, such as Xampp of EasyPHP):

$msg"; } /* ****************************** END ******************************* */ ?>

or

$_GET[msg]"; } ?>

You can easily resolve them by changing <? to <?php in your PHP pages (for instance, myaccount.php and login.php).

It is said that using <? instead of <?php can lead to errors.

But man, besides this minor issue, the PHP Login Script is simply awesome !!
Reply With Quote
  #7  
Old 05-13-2010, 08:06 PM
warriors1021's Avatar
warriors1021 warriors1021 is offline
Senior Member
 
Join Date: Apr 2010
Location: New Jersey
Posts: 209
warriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud of
Send a message via AIM to warriors1021
Default Re: PHP Errors

which version are you using?
Reply With Quote
  #8  
Old 05-13-2010, 09:27 PM
ledenjes ledenjes is offline
Junior Member
 
Join Date: May 2010
Posts: 8
ledenjes is on a distinguished road
Default Re: PHP Errors

Quote:
Originally Posted by warriors1021 View Post
which version are you using?
Formerly, I used version 2.1. The errors I prescribed were from this version.

Yesterday evening, I switched to version 2.3. I must admit, in version 2.3 a lot of these errors have been resolved, however not entirely. You should look for <? in all the php files and replace them all with <?php.

Besides, version 2.3 has some new coding errors, I believe, for instance login.php. No errors are shown when you enter false login information. Also the file activate.php is incomplete. The fill in (text area) fields are missing. I'm now looking on how to fix it, with the help of the file activate.php from version 2.1.
Reply With Quote
  #9  
Old 05-13-2010, 09:53 PM
warriors1021's Avatar
warriors1021 warriors1021 is offline
Senior Member
 
Join Date: Apr 2010
Location: New Jersey
Posts: 209
warriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud of
Send a message via AIM to warriors1021
Default Re: PHP Errors

what seems to be the problem in v2.3, havent tried all the files for myself yet?
Reply With Quote
  #10  
Old 05-14-2010, 02:35 AM
warriors1021's Avatar
warriors1021 warriors1021 is offline
Senior Member
 
Join Date: Apr 2010
Location: New Jersey
Posts: 209
warriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud ofwarriors1021 has much to be proud of
Send a message via AIM to warriors1021
Default Re: PHP Errors

i experienced the login error already, you get an error using the correct user name and wrong password. BUT you dont get an error if you use the wrong user name... probably not too hard to fix

haven't tested anything else yet.
Reply With Quote
  #11  
Old 05-14-2010, 12:50 PM
ledenjes ledenjes is offline
Junior Member
 
Join Date: May 2010
Posts: 8
ledenjes is on a distinguished road
Red face Re: PHP Errors

I found out that the file activate.php is not incomplete. Since version 2.3 this file now automatically activates the user. In version 2.1 the user had to manually type in the given activation code.

Furthermore, I found out that I made a mistake in the register.php file, myself. I left a space between value="Check Availability" and >, after translating the file into my own language. Because of this, the button no longer functioned.
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 12:29 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Webmasterpals.com (c) 2008 - All Rights Reserved