PHP Code:
if(empty($accname) || empty($accpass1) || empty($accpass2)|| empty($accname) || empty($accmail)) {
echo "<div class=\"page-alert error\"><strong>Please fill all the fields!</div>";
} elseif($row1 > '0') {
echo "<div class=\"page-alert error\"><strong>Account name already exists</div>";
Thats the previous code before in a if an the else if is sucessfull is this one
PHP Code:
mssql_query("INSERT INTO account.dbo.USER_PROFILE (user_no,user_id,user_pwd,resident_no,user_type,login_flag,login_tag,ipt_time,login_time,logout_time,user_ip_addr,server_id) VALUES ('$dk_user_no','".$accname."','".$accpass."','801011000000','1','0','Y','".date("Y-m-d H:i:s")."',null,null,null,'000')",$con);
echo '<div class="page-alert sucess"><strong>Awesome!</strong> your account has been created successfully!<br></div>';
PS: The code itself works, i can see the message in the div etc, and if is error or sucessfull it changes according to my css color etc. The problem is when the user refreh page after an error, the div of error still stays there, only if he moves to another page and comes back to register, thats the only way for it dissapear
Im kinda new at php