ASP Java - Login - Username Retention via Cookie??? HELP!!!

Soldato
Joined
25 Jan 2006
Posts
3,071
Location
Gateshead, Newcastle
bascially im trying to get a login system to work. im using it with a database, so the login part works fine, i want to retain the username thats been entered in a cookie for use in a later query to display user info.

i want to be able to have a login page that will take the user to a page where their details will be displayed from the database. if you can think of a better way of doing it please let me know.

im not brilliant at ASP or Java but any help/info will be much appreciated. a simple working example would really help too.

so please anyone out there with some skillz in this area, i could really do with some help.

Extra Info///

i want to be able to display the information in a table, which can then be updated. its basically a user area for updating their details im trying to achieve here.

Thanks for your time.
StevenG
 
Code:
        <form action="changedetails.asp" method="get" name="login" id="login">
          <div align="center"><table width="32%"  border="0">
  <tr>
    <td width="23%"><div align="right">E-Mail</div></td>
    <td width="77%"><input name="email" type="text" id="email"></td>
  </tr>
  <tr>
    <td><div align="right">Surname</div></td>
    <td><input name="surname" type="text" id="surname"></td>
  </tr>
  <tr>
    <td colspan="2"><div align="center">
        <input type="submit" name="Submit" value="Submit">
        
        <input type="reset" name="Submit2" value="Reset">
    </div></td>
    </tr>
</table>
</form>

that's my form.. which send the email and surname to the second page for use there. but i wanted to be able to use a form to Login. which uses the
Code:
<%=MM_LoginAction%>
post action, so the variables arent sent to the second page.

i want to be able to duplicate the variables sent to the database, to be available on the second page for use there.

if you get what i mean. any further help would be much appreciated.

Thanks
StevenG
 
noob said:
Session("email") = Request.Form("email")
Session("surname") = Request.Form("surname")

i get the following error when i do that.

Error Type:
Session object, ASP 0168 (0x80004005)
An intrinsic object cannot be stored within the Session object.
/it training/login.asp, line 248.

okay i have a new question.

//changedetails.asp?email=[email protected]&surname=graham&Submit=Submit

So something like. If email=email(from database) and surname=surname(from database) then grant access
else deny
end if

I know its going to be more complicated than that but any help will be aprecitated.

i need the details in the URL to make my queries work on the second page.

again, any help given will be appreciated.

Thanks, StevenG
 
Last edited:
Back
Top Bottom