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
Post a Comment