get MemberID without inc_header.asp? - Posted (2105 Views)
Senior Member
tribaliztic
Posts: 1532
1532
Is it possible to get MemberID without using inc_header.asp?
I'm working on an uploadthingy with a popup-window. At first I used this link:
<a href=""javascript:openWindow6('ezuploadorig.asp?memid=" & MemberID & ')"">
and then got the memid via Request.Querystring("memid").
But:
after selecting the files I want to upload the popup-window reloads and the memid is lost... If I include the inc_header.asp I get an error as stated in another thread. <
/Tribaliztic
- www.gotlandrace.se -
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Senior Member
tribaliztic
Posts: 1532
1532
ouch, it's been awhile.. I THINK that I just forwarded the value in the redirect like this:
Response.Redirect "ezuploadorig.asp?memid=" & variable & ""
<
/Tribaliztic
- www.gotlandrace.se -
Posted
Average Member
cripto9t
Posts: 881
881
You can use the chkUser() function located in "inc_func_common.asp"
It returns "mLev" (Members Level) and "MemberID".
Code:
<!-- #INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<%
'## Open connection
set my_Conn= Server.CreateObject("ADODB.Connection")
my_Conn.Open strConnString

'## Check for the cookie
strDBNTUserName = Request.Cookies(strUniqueID & "User")("Name")

chkCookie = 1
mLev = cLng(chkUser(strDBNTUserName, Request.Cookies(strUniqueID & "User")("Pword"),-1))
chkCookie = 0

'## Your stuff starts here
Response.Write MemberID & "<br />" & mLev
'## Your stuff ends

'## Close connection
my_Conn.Close
set my_Conn = nothing
%>
<
    _-/Cripto9t\-_
Posted
Support Moderator
Shaggy
Posts: 6780
6780
You'll need to dim the MemberID variable first. Never mind, just spotted that you included config.asp; MemberID is already dimmed in there.
<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Posted
Member Locked
puthen
Posts: 7
7
hi,
Iam developing the pages in .net frame work and hence it is a pain to incorporate include files(asp) in the webforms.Is there any work around?
I need to protect only one page in my website.<
This account was hacked into by Image, a very honest guy as you all can see! Stealing people' s passwords IS his pasttime.
You Must enter a message