Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: RES: Checking User


Message #1 by "Elildo Mancebo Reis" <lists@a...> on Wed, 19 Mar 2003 11:28:23 -0300
Just use...
if Username = "" then
   ...
end if

It would be good...
if len(trim(username)) = 0 then

Elildo Mancebo Reis
elildo@a...
www.aspecto.net

-----Mensagem original-----
De: Andy [mailto:andy@t...]
Enviada em: quarta-feira, 19 de março de 2003 11:20
Para: ASP Web HowTo
Assunto: [asp_web_howto] Checking User


Hello,

I have an asp page which allow user to create an account.When the form is
submited, I perform some checking on the username field, if the username
field is empty , it will return an error message but it seems not be
working.Below is my code :

'Save entered username and password
 Username = Request.Form("txtUsername")
 Password = Request.Form("txtPassword")
 Fullname = Request.Form("txtFullname")
 Email = Request.Form("txtEmail")

 If Username = " " Then
  Response.Redirect "signup.asp?loginname=failed"
 End If


Hope someone might guide me through.


Thanks.


Andy


%%email.unsub%%

Message #2 by "Andy" <andy@t...> on Wed, 19 Mar 2003 22:37:39 +0800
Hello ,

That works!!! Thanks....:-)

How can I check if the user has enter a valid email address with the "@"
sign ?

Thanks


Andy
----- Original Message -----
From: "Elildo Mancebo Reis" <lists@a...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Wednesday, March 19, 2003 10:28 PM
Subject: [asp_web_howto] RES: Checking User


> Just use...
> if Username = "" then
>    ...
> end if
>
> It would be good...
> if len(trim(username)) = 0 then
>
> Elildo Mancebo Reis
> elildo@a...
> www.aspecto.net
>
> -----Mensagem original-----
> De: Andy [mailto:andy@t...]
> Enviada em: quarta-feira, 19 de março de 2003 11:20
> Para: ASP Web HowTo
> Assunto: [asp_web_howto] Checking User
>
>
> Hello,
>
> I have an asp page which allow user to create an account.When the form is
> submited, I perform some checking on the username field, if the username
> field is empty , it will return an error message but it seems not be
> working.Below is my code :
>
> 'Save entered username and password
>  Username = Request.Form("txtUsername")
>  Password = Request.Form("txtPassword")
>  Fullname = Request.Form("txtFullname")
>  Email = Request.Form("txtEmail")
>
>  If Username = " " Then
>   Response.Redirect "signup.asp?loginname=failed"
>  End If
>
>
> Hope someone might guide me through.
>
>
> Thanks.
>
>
> Andy
>
>
> %%email.unsub%%
>
>
>
>

Message #3 by "Carter Harris" <carter@t...> on Wed, 19 Mar 2003 08:54:51 -0600
// **********************************************************
// checkEmail
// **********************************************************
function checkEmail (strng) {
var error=3D"";
if (strng =3D=3D "") {
//   error =3D "You didn't enter an email address.\n";
    return error
}

    var emailFilter=3D/^.+@.+\..{2,3}$/;
    if (!(emailFilter.test(strng))) {
       error =3D "Please enter a valid email address.\n";
    }
    else {
//test email for illegal characters
       var illegalChars=3D /[\(\)\<\>\,\;\:\\\"\[\]]/
         if (strng.match(illegalChars)) {
          error =3D "The email address contains illegal characters.\n";
       }
    }
return error;   
}

-----Original Message-----
From: Andy [mailto:andy@t...]
Sent: Wednesday, March 19, 2003 8:38 AM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: RES: Checking User


Hello ,

That works!!! Thanks....:-)

How can I check if the user has enter a valid email address with the "@"
sign ?

Thanks


Andy
----- Original Message -----
From: "Elildo Mancebo Reis" <lists@a...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Wednesday, March 19, 2003 10:28 PM
Subject: [asp_web_howto] RES: Checking User


> Just use...
> if Username =3D "" then
>    ...
> end if
>
> It would be good...
> if len(trim(username)) =3D 0 then
>
> Elildo Mancebo Reis
> elildo@a...
> www.aspecto.net
>
> -----Mensagem original-----
> De: Andy [mailto:andy@t...]
> Enviada em: quarta-feira, 19 de mar=E7o de 2003 11:20
> Para: ASP Web HowTo
> Assunto: [asp_web_howto] Checking User
>
>
> Hello,
>
> I have an asp page which allow user to create an account.When the form

> is submited, I perform some checking on the username field, if the
> username field is empty , it will return an error message but it seems

> not be working.Below is my code :
>
> 'Save entered username and password
>  Username =3D Request.Form("txtUsername")
>  Password =3D Request.Form("txtPassword")
>  Fullname =3D Request.Form("txtFullname")
>  Email =3D Request.Form("txtEmail")
>
>  If Username =3D " " Then
>   Response.Redirect "signup.asp?loginname=3Dfailed"
>  End If
>
>
> Hope someone might guide me through.
>
>
> Thanks.
>
>
> Andy
>
>
> ---
> Change your mail options at http://p2p.wrox.com/manager.asp or to
> unsubscribe send a blank email to %%email.unsub%%
>
>
> ---
> Change your mail options at http://p2p.wrox.com/manager.asp or to
> unsubscribe send a blank email to
>
>





  Return to Index