![]() |
Re: Simple Login in ASP using MS Access database
Just write the set of if's and then Response.Redirect to the correct page unless you have some definite logic for the redirection.
|
Re: Simple Login in ASP using MS Access database
So you mean like this
Normal 'If remember me selected if RememberMe = "ON" then 'Writing cookies permanently Response.Cookies("UserName")=UserName Response.Cookies("Password")=Password Response.Cookies("UserName").Expires = Now() + 365 Response.Cookies("Password").Expires = Now() + 365 Response.Redirect "welcome.asp" else 'writing cookies temporarily Response.Cookies("UserName")=UserName Response.Cookies("Password")=Password Response.Redirect "welcome.asp" end if My version 'If remember me selected if RememberMe = "ON" then 'Writing cookies permanently Response.Cookies("UserName")=test Response.Cookies("Password")=test Response.Cookies("UserName").Expires = Now() + 365 Response.Cookies("Password").Expires = Now() + 365 Response.Redirect "test.asp" else 'writing cookies temporarily Response.Cookies("UserName")=test Response.Cookies("Password")=test Response.Redirect "test.asp" end if |
Re: Simple Login in ASP using MS Access database
do you have any sample code for the signup.asp so that new users could sign up?
|
Re: Simple Login in ASP using MS Access database
Hey, I copy and pasted your code over and created the database with microsoft access, and I keep getting this error:
HTTP 500.100 - Internal Server Error - ASP error Internet Information Services Technical Information (for support personnel) * Error Type: Microsoft JET Database Engine (0x80040E10) No value given for one or more required parameters. /news/verify.asp, line 37 * Browser Type: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 * Page: POST 45 bytes to /news/verify.asp I'm not sure why either... thanks for your help, melissa |
Re: Simple Login in ASP using MS Access database
biztalk:
make an extra field in the DB for each user called something like "redirectPage" or something, and then for the redirect where it says: Response.Redirect "blah blah blah", replace with: Set rsStudent = Server.CreateObject("ADODB.Recordset") 'this should go near the top of your code Response.Redirect rsStudent("redirectPage") and then at the end be sure to put: rsStudent.Close set rsStudent = Nothing hope that helps! :) |
Re: Simple Login in ASP using MS Access database
(the ifs are too messy, and it's much easier to just include it in our DB.)
|
Re: Simple Login in ASP using MS Access database
Hey guys,
I got this error message. The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed. -------------------------------------------------------------------------------- Please try the following: Click the Refresh button, or try again later. Open the fica home page, and then look for links to the information you want. HTTP 500.100 - Internal Server Error - ASP error Internet Information Services -------------------------------------------------------------------------------- Technical Information (for support personnel) Error Type: Microsoft JET Database Engine (0x80040E10) No value given for one or more required parameters. /verify.asp, line 38 Browser Type: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30) Page: POST 36 bytes to /verify.asp POST Data: username=????&password=????&B1=LogIn Time: Thursday, July 03, 2008, 10:03:38 AM More information: Microsoft Support |
Re: Simple Login in ASP using MS Access database
If you're suffering the same problem as me, the closest I've been able to get to a pseudo-solution is that the actual CDONTS/CDOSYS cannot send the mail out because the port is being blocked by a firewall of some sort, or that the settings on the server won't allow mail to be sent out.
I don't have a system admin because they won't hire one, so I'm kind of stuck in cold water. I hope you solve yours though.... oh, just to clarify, if you're having the same problem as me, then it's not a code problem, it's a server problem. |
Re: Simple Login in ASP using MS Access database
got a question im looking for some scripts.
A sql detection script created in asp a script to do a forgot password link if any of you guys know one can u please post it thanks |
Re: Simple Login in ASP using MS Access database
carrathanatos,
I figured out what was wrong with my code. In access database I named the column wrong. Here's a link. I hope this helps. http://www.adopenstatic.com/faq80040e10.asp |
| All times are GMT +5.5. The time now is 09:50. |