2 Replies - 1572 Views - Last Post: 19 February 2006 - 07:28 AM Rate Topic: -----

#1 Heba  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 19-February 06

ASP HELP

Posted 19 February 2006 - 03:50 AM

Hi ..

I am new here and i really need help .. In ASP

This is the form code

<form name="login" method="post" action="confirm.asp">
        <div align="center">          
          <p><br>
            <strong><span class="style16">Please insert your username and password to log into the system. </span></strong></p>
          <table width="312" border="1" cellspacing="3" bordercolor="#000000">
    <tr>
      <td width="92"><span class="style15">Username:</span></td>
      <td width="195" colspan="2"><input type=text name="username" size="25"></td>
      </tr>
    <tr>
      <td><span class="style15">Password:</span></td>
      <td colspan="2"><input type=text name="password" size="25"></td>
      </tr>
    <tr>
      <td colspan="3"><div align="center">
        <input name="Submit" type="submit" value="Submit">
      </div></td>
      </tr>
  </table>
  <br>
        </div>
      </form>


This is the confirm.asp


 <%
DIM strUsername, strPassword
strUsername = Request.Form("username")
strPassword = Request.Form("password")


IF strUsername <> "" AND strPassword <> "" THEN

' Process the form as you like here
' For example enter form to your database or send it via email

ELSE

Response.Write "<p>Please click back on your browser and complete the following fields:</p>"
IF strUsername <> "" THEN
ELSE
Response.Write "<b>• Username</b><br>"
END IF
IF strPassword<> "" THEN
ELSE
Response.Write "<b>• Password</b><br>"
END IF

END IF 
%>



But it doesnt work .. All i want is to check if the username and password match then they willl log in

Is This A Good Question/Topic? 0
  • +

Replies To: ASP HELP

#2 Heba  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 19-February 06

Re: ASP HELP

Posted 19 February 2006 - 04:27 AM

:sleepy: plz help
Was This Post Helpful? 0
  • +
  • -

#3 Amadeus  Icon User is offline

  • g+ + -o drink whiskey.cpp
  • member icon

Reputation: 248
  • View blog
  • Posts: 13,506
  • Joined: 12-July 02

Re: ASP HELP

Posted 19 February 2006 - 07:28 AM

The code you have written will check to see if the username and password have been supplied...what else do you want to check?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1