CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 automatically logging in after registering

Print topic Send  topic

Author Message
John Reitano
Posted: 04/17/2002, 9:26 AM

I would like to automatically log the user in after he registers via my "MemberRegistration" page. After the user registers, I have the his Login and Password and would like to pass these to the Login page and have the Login form's action performed. I would like to do this in a secure way, e.g., using POST instead of GET.

Any ideas on how to accomplish this?

I'm working in JSP but I can read examples in ASP or perl.
Jon Westfall
Posted: 04/17/2002, 9:36 AM

All you need to do is set the 2 global session variables UserID and UserRights. The gotocode ccs file has the following code:

set_session("UserID", dlookup("users", "user_id", "user_login =" . tosql($flduser_login, "Text")));
set_session("UserRights",1);

which shows how to do it in ASP. Simply find the syntax for JSP and implement after insert on your registration form.

Jon.
andrewr
Posted: 09/11/2003, 7:37 AM

Can someone tell me the vbscript equivilant? I am not sure that the $fld variable refers to
David Dossot
Posted: 09/26/2003, 1:54 PM

Hey John,

I agree that the session variable solution is the cleanest one. If you want to stick to your idea of POSTing, then you would have to do that:

- the JSP that receives the registration detail should POST to the login JSP (cf. how there: http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html),

- this JSP should then return to the browser the reply of the POST on the login JSP.

This should do the trick.
Take care,
David

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.