When Deleteing A Member - Posted (2046 Views)
Senior Member
leatherlips
Posts: 1838
1838
Sometimes when I go to delete a member I get a little apprehensive that I may accidentally delete the wrong person. I would like to have the members name appear on the pop_delete.asp page so I know I am deleting the correct person.
I have uploaded the picture below to show what I would like it to do.
I was trying to figure out how to add the member name to appear but I can't figure it out. The pop_delete.asp file is too complicated for me and I don't want to mess it up. Can anyone help? Thanks.
<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Snitz Forums Admin
ruirib
Posts: 26364
26364
Member_ID is passed in the query string. Any reason for not using it to retrieve the member's name from the database?<
Posted
Posted
Average Member
phy1729
Posts: 589
589
"SELECT M_NAME FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID = " & Member_ID<
Posted
Average Member
phy1729
Posts: 589
589
In pop_delete.asp line 694-696
Code:

			case "Member"
Response.Write("Member")
case "Category"
to
Code:

			case "Member"
strsql="SELECT M_NAME FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID = " & Member_ID
set rs = my_Conn.Execute (strSql)
M_NAME = rs("M_NAME")
rs.close
set rs = nothing
Response.Write("Member <br> " & M_NAME)
case "Category"
This has been tested.<
Posted
Posted
Average Member
phy1729
Posts: 589
589
Your welcome.<
Posted
Support Moderator
Shaggy
Posts: 6780
6780
There's already a function in inc_func_secure.asp that returns a member's username if you pass the id through it, like so:

Code:
response.write getMemberName(Member_ID)
You may need to include inc_func_secure.asp in pop_delete.asp if it isn't already included.
<
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
Average Member
phy1729
Posts: 589
589
Well that makes modding easier. Thanks Shaggy. New Code:
Code:

			case "Member"
Response.Write("Member <br> " & getMemberName(Member_ID))
case "Category"
<
Posted
Support Moderator
Shaggy
Posts: 6780
6780
You're welcome smile
<
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
Junior Member
PPSSWeb
Posts: 312
312
This is a nice little addition to help reduce mistakes. It works for lock (pop_lock.asp) and unlock (pop_open.asp) as well.<
You Must enter a message