php - Unable to get logic correct for registration -


i made bunch of if else statements print out when user gets through registration code in php. code follows:

<div class="lower-body">     <div class="left-lower">create account</div>     <div id="account-first">     <?php      /*if(@$_post['action'] == 'register' && empty($errors) === true){         echo 'you\'ve been registered successfully!' . "\n";          echo 'please check email , activate account!';      }else {*/      if(empty($_post) === false && empty($totalerror) === true ){         $register_data = array(             'firstname' => $_post['firstname'],             'lastname'  => $_post['lastname'],             'username'  => $_post['username'],             'password'  => $_post['password'],             'email'     => $_post['email'],             'areacode'  => $_post['areacode']             );          register_user($register_data);         $regdone[] = 'value';         echo          //header('location: register.php?sucess');         //exit();     } else if(empty($errors) === false){         echo output_errors($errors);         } else if(empty($regdone) === false){             echo "check email activate account!";         }     //} ?> 

at end says have check email activation. added array , added value after data given mysql. if not empty (should filled if completed) print statement.

it makes sense me why isnt working?

thanks lot!

if i'm not getting wrong need use if instead else if.

if(empty($regdone) === false){     echo "check email activate account!"; } 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -