Undesired Results

Undesired Results

I have a form set up that checks whether or not a user has logged in or has already submitted a form. However if the user is logged in and not submitted the form it should display all of the fields.

Here is the code:


checkclan = input.Added_User;
checkpublic = "Public";
if (input.Added_User  ==  checkclan)
{
    hide clan_region;
    hide clan_tag;
    hide clan_name;
    hide clan_homepage;
    hide clan_region;
    hide clan_history;
    hide clan_email;
    hide clan_adminpass;
    hide clan_changepass;
    hide clan_storedpass;
    hide clan_logo;
    hide clan_terms;
    hide clan_otherregion;
    openUrl("http://creator.zoho.com/dgodfather/clan-management-new/#View:Already_Registered", "same window");
}
else if (zoho.loginuser  ==  checkpublic)
{
    hide clan_region;
    hide clan_tag;
    hide clan_name;
    hide clan_homepage;
    hide clan_region;
    hide clan_history;
    hide clan_email;
    hide clan_adminpass;
    hide clan_changepass;
    hide clan_storedpass;
    hide clan_logo;
    hide clan_terms;
    hide clan_otherregion;
    openUrl("http://creator.zoho.com/dgodfather/clan-management-new/#View:Sign_In", "same window");
}
else
{
    show clan_region;
    show clan_tag;
    show clan_name;
    show clan_homepage;
    show clan_region;
    show clan_history;
    show clan_email;
    show clan_adminpass;
    hide clan_changepass;
    hide clan_storedpass;
    show clan_logo;
    show clan_terms;
    show clan_otherregion;
    if (input.clan_otherregion  ==  "Other")
    {
        show clan_otherregion;
    }
    else
    {
        hide clan_otherregion;
    }
}



For whatever reason when a user who has logged in and not submitted a form gets automatically redirected to another page not listed in the code. Neither of the two redirect urls in the code above forward you to this other page. These pages are only plain text.

Any ideas why this is happening?