When Deleteing A Member

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/66755?pagenum=1
05 November 2025, 05:15

Topic


leatherlips
When Deleteing A Member
31 March 2008, 20:41


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.
<

 

Replies ...


ruirib
31 March 2008, 20:45


Member_ID is passed in the query string. Any reason for not using it to retrieve the member's name from the database?<
leatherlips
31 March 2008, 20:53


I just don't know how to do that. blush<
phy1729
31 March 2008, 21:10


"SELECT M_NAME FROM " & strMemberTablePrefix & "MEMBERS WHERE MEMBER_ID = " & Member_ID<
phy1729
31 March 2008, 21:28


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.<
leatherlips
31 March 2008, 21:38


Perfect! Thank you so much! bigsmile<
phy1729
31 March 2008, 21:40


Your welcome.<
Shaggy
01 April 2008, 04:21


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.
<
phy1729
01 April 2008, 07:04


Well that makes modding easier. Thanks Shaggy. New Code:
Code:

			case "Member"
Response.Write("Member <br> " & getMemberName(Member_ID))
case "Category"
<
Shaggy
01 April 2008, 07:56


You're welcome smile
<
PPSSWeb
01 April 2008, 09:35


This is a nice little addition to help reduce mistakes. It works for lock (pop_lock.asp) and unlock (pop_open.asp) as well.<
TastyNutz
01 April 2008, 09:35


Nice little tweak. Thanks guys.<
Andy Humm
10 April 2008, 18:52


Nice little tweak -

Quote "It works for lock (pop_lock.asp) and unlock (pop_open.asp) as well."
Where do we amend the code to reflect the additional tweak?<
phy1729
10 April 2008, 19:51


pop_lock.asp line 197
Code:

			case "Member"
Response.Write("Lock Member <br> " & getMemberName(Member_ID))
case "STopic"
pop_open.asp line 189
Code:

			case "Member"
Response.Write("Un-Lock Member <br> " & getMemberName(Member_ID))
case "STopic"
<
Andy Humm
11 April 2008, 07:49


thank you ever so much.. andy<
texanman
14 April 2008, 12:50


Sorry guys! These changes create a mismatch error when locking a member from the members list.<
HuwR
14 April 2008, 13:16


can you post the exact error/line number that you are getting, since it should make no difference where it is being called from, the code for pop_lock is the same regardless<
texanman
14 April 2008, 13:29


Here:

Microsoft VBScript runtime error '800a000d'

Type mismatch: 'getMemberName'

/pop_lock.asp, line 197

and line 197 is:

Response.Write("Lock Member <br> " & getMemberName(Member_ID))

The same error occurs when you unlock in line 189:

Response.Write("Un-Lock Member <br> " & getMemberName(Member_ID))


<
HuwR
14 April 2008, 13:36


have you included inc_func_secure.asp in your pop_lock.asp file ?<
texanman
14 April 2008, 13:39


emm may be becuase inc_func_secure.asp is not included in pop_lock?!<
texanman
14 April 2008, 13:43


Yeap, that was it. Sooo sorry.<
Maxime
14 April 2008, 16:44


Include this line below in the page-and lock.asp includes pop_open.asp under the already present on these pages as indicated Shaggy
<!--#INCLUDE FILE="inc_func_secure.asp" -->
<
leatherlips
14 April 2008, 16:59


One more thing...
How would I get the member name to be a different color? I think the strHiLiteFontColor is red. Would I use that? If so, how would I insert it? Whenever I try I mess it up. blush<
phy1729
14 April 2008, 17:08


Response.Write("Member <br><b><font color=""" & strHiLiteFontColor & """>" & getMemberName(Member_ID)) & "</font>"<
leatherlips
14 April 2008, 17:18


Perfect! Like the bold too! Thank you! bigsmile
I'm not completly sure, but should you close the bold tag like this?
Response.Write("Member <br><b><font color=""" & strHiLiteFontColor & """>" & getMemberName(Member_ID)) & "</font></b>"<
phy1729
14 April 2008, 17:40


Nice catch. I guess that wasn't in my copy and paste.<
© 2000-2021 Snitz™ Communications