OutFront Forums
     Home    Register     Search      Help      Login    

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

Sponsors
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

 

Form that carry's User ID

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP, PHP, and Database >> Form that carry's User ID
Page: [1]
 
mjmtravel

 

Posts: 327
Joined: 7/30/2006
Status: offline

 
Form that carry's User ID - 9/21/2009 20:35:34   
I have a 3 part form that is filled out by a spooky logged in user. The form I have set up works fine but I need to carry the users ID and add it to the database along with the form information, preferably hidden.

Is this possible? I have tried to added it at the bottom of the form but I'm not sure how to ask to carry the user ID from the page, since the user is logged in when filling out the form.

Hope that makes sense.
Spooky

 

Posts: 26681
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Form that carry's User ID - 9/21/2009 20:46:32   
If the user has logged in, then the value is already available in a session? If so, its just a case of using that session value (it doesnt need to be carried from page to page)

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

Sp:)ky


(in reply to mjmtravel)
mjmtravel

 

Posts: 327
Joined: 7/30/2006
Status: offline

 
RE: Form that carry's User ID - 9/21/2009 20:49:08   
The user is logged in but how do I get his user number into the database?

(in reply to Spooky)
Spooky

 

Posts: 26681
Joined: 11/11/1998
From: Middle Earth
Status: offline

 
RE: Form that carry's User ID - 9/22/2009 1:30:13   
How are you adding it to the database currently? - the session value can be added directly to the SQL string when the form is submitted, it doesnt have to be part of the form

_____________________________

If you arent part of the solution, then there is good money to be made prolonging the problem

Sp:)ky


(in reply to mjmtravel)
mjmtravel

 

Posts: 327
Joined: 7/30/2006
Status: offline

 
RE: Form that carry's User ID - 9/22/2009 20:19:20   
Spooky
Right now I'm adding it manually but I would really like to add the user ID automatically. I think you gave me this code to put at the top of the page to actually add the user name to the database.

Its been a while since I've messed with this code so I"m not sure if its correct but it seems to be working.

Can I adjust this code to add the user ID also?

<%
If Session("UserName")&"" = "" AND Request.cookies("Spooky")("T1aUs")&""="" Then
Response.redirect "/index.asp?Redirect=" &Request.Servervariables("URL")
End if
%>

(in reply to Spooky)
Page:   [1]

All Forums >> Web Development >> ASP, PHP, and Database >> Form that carry's User ID
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts