You need to sign in to do that
Don't have an account?
Raviteja
vf
-----
<apex:page Controller="Logincls" sidebar="false">
i want creat loginpage
i created one object to maintain the username&passwords of users.i wrote some code it showing error...
vf
-----
<apex:page Controller="Logincls" sidebar="false">
<apex:form >
<apex:pageBlock title="GMAIL ACCOUNT" >
<apex:pageBlockSection title="ENTER USERNAME&PASSWORD">
<apex:inputtext label="USERNAME" Value="{UserID}"/>
<apex:outputText ></apex:outputText>
<apex:inputtext label="PASSWORD" Value="{Password}"/>
</apex:pageBlockSection>
<apex:pageblocksection >
<apex:commandButton value="LOGIN" action="{!login}"/>
</apex:pageblocksection>
</apex:pageBlock>
</apex:form>
</apex:page>
apex
-------
public class logincls
{
public string pass;
public string userid{get;set;}
public string password{get;set;}
{
pass=[select password__c from login__c where user_id__c=:userid];
}
public pagereference login
{
if(password=pass)
pagereference hello = new pagereference('apex/helloworld');
hello.setredirect(true);
return hello;
}
}
THANKS IN ADVANCE...
apex
-------
public class logincls
{
public string pass;
public string userid{get;set;}
public string password{get;set;}
{
pass=[select password__c from login__c where user_id__c=:userid];
}
public pagereference login
{
if(password=pass)
pagereference hello = new pagereference('apex/helloworld');
hello.setredirect(true);
return hello;
}
}
THANKS IN ADVANCE...
It helps if you specify a specific question, or at least show us the error you are receiving.
apex:
Only typed it here, so may have typos or may have looked over somethings, but this should get you in the right direction.