Wednesday, August 18, 2010

How do I add a new field to an ASP login and save it to SQL?

I have the login working, but I tried to add another field for when a user registers for a login. It doesn't seem like it is saving the new field to the SQL database. Also, how do I call back the information in that field for the logged in user so I can use it on the page?How do I add a new field to an ASP login and save it to SQL?
hi,


When you try adding another field in a registration script, it doesn't mean you just alter by adding an extra field.





You have to alter the database by adding that field, and you have to tell your program to insert that field into the database. I don't know your script inorder to help you out.





You have to re-edit the insert query to fit your specified inputs (new ones as well).





You have to have some programming experience inorder to do such thing.





To do use that login information, you have to alter your login script and initialize or set a SESSION once the user was verified,





You have to understand the concept of SESSIONS first before continuing.


http://www.sitepoint.com/article/asp-ses鈥?/a>








But here is how you do it...


AFTER you verified that the user has been logged in do this:





response.write Session(';username';)=';the name from database';





NOW to USE it in any page you do this:


you can just print Session(';username';)





Enjoy.. Good luck on it

No comments:

Post a Comment