Form validation error / glitch? oO

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ShadowIce
Forum Commoner
Posts: 75
Joined: Tue Jan 12, 2010 8:43 am

Form validation error / glitch? oO

Post by ShadowIce »

EDIT... =D
Last edited by ShadowIce on Mon Jan 18, 2010 4:55 pm, edited 1 time in total.
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: Form validation error / glitch? oO

Post by McInfo »

When you omit curly braces ({}) from a conditional statement, only the first statement after the condition is controlled.

Code: Select all

if (false)
    echo 'never displayed; controlled by the condition';
    echo 'deceptively indented; always displayed; not controlled by the condition';
Edit: This post was recovered from search engine cache.
Last edited by McInfo on Thu Jun 17, 2010 4:27 pm, edited 1 time in total.
ShadowIce
Forum Commoner
Posts: 75
Joined: Tue Jan 12, 2010 8:43 am

Re: Form validation error / glitch? oO

Post by ShadowIce »

didnt work.....
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Form validation error / glitch? oO

Post by John Cartwright »

Um.. did you try adding the curly braces around the conditional code?

You generally want to post exactly what you tried.. saying it doesn't work is of absolutely no help.
ShadowIce
Forum Commoner
Posts: 75
Joined: Tue Jan 12, 2010 8:43 am

Re: Form validation error / glitch? oO

Post by ShadowIce »

EDIT... =D
Last edited by ShadowIce on Mon Jan 18, 2010 4:56 pm, edited 1 time in total.
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: Form validation error / glitch? oO

Post by McInfo »

The condition I was referring to in my first comment is this, on line 35 of the script you originally posted.

Code: Select all

if (count($errors) > 0)
Edit: This post was recovered from search engine cache.
Last edited by McInfo on Thu Jun 17, 2010 4:27 pm, edited 1 time in total.
ShadowIce
Forum Commoner
Posts: 75
Joined: Tue Jan 12, 2010 8:43 am

Re: Form validation error / glitch? oO

Post by ShadowIce »

EDIT... =D
ShadowIce
Forum Commoner
Posts: 75
Joined: Tue Jan 12, 2010 8:43 am

Re: Form validation error / glitch? oO

Post by ShadowIce »

Case: Closed! =D I fixed the problem! =D
User avatar
McInfo
DevNet Resident
Posts: 1532
Joined: Wed Apr 01, 2009 1:31 pm

Re: Form validation error / glitch? oO

Post by McInfo »

Deleting the content of your posts does not benefit the community.

Edit: This post was recovered from search engine cache.
Post Reply