- start_form("get"); #will start the form
-
print "What's the User name? ",textfield(-name=>'Username',-value=>'user'),
-
#will get the user name
-
-
p, #this gives a new paragraph
-
-
"Please enter your password: ",textfield(-name=>'password',-value=>'pass'),
-
#will get the password
-
-
-
#to validate is the problem
-
-
-
p;
-
if(defined $user && $user eq "") #if the defined value is equal to/or "blank" print
-
{
-
-
print "please enter a value for name",p;
-
}
-
else
-
{
-
if(defined $pass && $pass eq "") #if b's value number is blank print "please enter a value for number
-
{
-
print "please enter a password",p;
-
}
-
}
-
print hr,
-
-
submit('Submit Details for NextScreen'); #will submit when entered
-
print hr;
-
print hr;
-
sub DrawLogin {
-
print hr,
-
'Username: ',
-
textfield( -name=>'user', -default=>'', -size=>15 ),
-
p,
-
'Password: ',
-
password_field( -name=>'pass', -value=>'', -size=>15 ),
-
p;
-
-
print hr,
-
submit( -name=>'next', -value=>'Login' ),
-
hr; # submits user and pass
-
end_form();
-
}
-
have checked if empty but want to check if user entered data to compare against it
0 1297 Sign in to post your reply or Sign up for a free account.
Similar topics
by: Joeri KUMBRUCK |
last post by:
Hello,
I'm trying to create an ASP page where users can type in a username
and password, and these credential should be checked with active
directory. If username and password are correct, the...
|
by: Steffen Balslev |
last post by:
I tried to find a way to validate user credentials using C#, searching google and lots of other news and kb sites left me without a solution.
You can use a SSPI but it's that easy to implement so...
|
by: Joeri KUMBRUCK |
last post by:
Hello,
I'm trying to create an ASP page where users can type in a username
and password, and these credential should be checked with active
directory. If username and password are correct, the...
|
by: Rajani |
last post by:
Hello,
I am learning asp.net and i have experience in asp. I am using VS.NET for
developing dotNET pages.
Its login form. I placed two asp:textbox s for userid and password. and one
button(html...
|
by: Navillus |
last post by:
Hey gang,
I have a login form that is empty by default, but can be filled with
values from a previous form:
<input type=text maxlength="40" size="40" name="user" value="`usr`">
<input...
|
by: shapper |
last post by:
Hello,
I am trying to check if a user is valid as follows:
Response.Write(Membership.ValidateUser("usr", "pass").ToString)
It always gives me FALSE.
The username and password are correct....
|
by: SkipNRun |
last post by:
I am a novice when comes to JavaScript, AJAX. I am working on a form, which will allow users to update their contact information. In order to make the form flexible, I need to use pull down list.
...
|
by: RyanT |
last post by:
I am trying to enhance an existing process where the user currently inputs his/her user ID and password in two separate InputBoxes. I created a form with a UserID field and a Password field (with...
|
by: ojnoka |
last post by:
Hi,
I am a newbie. I don't know javascript. I use the free javascripts and try to understand them.
I have a javascript now, to validate username and password. I paste it below. My question now. Is...
|
by: sc0705837 |
last post by:
Hi there I am trying to get my action page of the website I'm building to check to see if the form input values are empty, if they are not it will then check to see if any of the form inputs contain...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |