Jump to content

Errors


jrws

Recommended Posts

Alright I guess, I didn't make it clear, I will try again :D

OK so what happens is that I have the $error array. This contains errors to display when something happens that I don't want to happen for example having a user enter blank info. The problem is these errors are now displaying even when there are no errors to display. I hope that clears it up.

Link to comment
Share on other sites

I can see from your code:

if (!$user || !$disname || !$pass || !$passcon || !$email || !$emailcon) {

 

so if the case is:

if(0 or 1 or 1 or 1 or 0 or 1) = true
0 or 1 = 1
1 or 1 = 1
0 or 0 = 0

 

You want from that line to check if all the inputs are filled, so and AND logical operator is the right choice. If only one of the variables returns false, the whole expression becomes false. Modified with AND:

if (!$user && !$disname && !$pass && !$passcon && !$email && !$emailcon) {

 

For the problem you have, I can't seem to find any errors. Try to debug the code, checking if there is any misspelled variable, any misplaced if() statement (as you have many of them) and check what count($errors) give.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.