Author |
Topic  |
redbrad0
Advanced Member
    
USA
3725 Posts |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 06 June 2004 : 15:21:54
|
YES, that helped!!! Thank-you very much!! |
-=NiteOwl=-
|
Edited by - NiteOwl on 06 June 2004 16:36:42 |
 |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 06 June 2004 : 17:00:58
|
Whew, almost there, I owe you guys a beer!
So the last piece of this puzzle for me is to now be able to present a form like the read_new_policy.asp and have available a string which will update the M_View_Policy field in the Forum.Members table.
Initially I am using a copy of the Policy.asp but I am unsure how or where to add the Agree form to the code.
|
-=NiteOwl=-
|
Edited by - NiteOwl on 06 June 2004 17:28:21 |
 |
|
redbrad0
Advanced Member
    
USA
3725 Posts |
Posted - 06 June 2004 : 17:49:56
|
Well first thing I just noticed when I went to your site is that if its a new user that has not yet signed up or logged in they get sent to the new policy page. You need to have a check in inc_header.asp right before this function is called where its basically like
If MemberID>0 Then
' #THEY ARE A MEMBER SO LETS CHECK FOR NEW POLICY PAGE
ReadNewPolicy(MemberID)
Else
' # THEY ARE NOT A MEMBER SO DON'T DO ANYTHING
End If
Next you need to change this line <form action="register.asp?mode=Register" id="form1" method="post" name="form1">
with this line <form action="read_new_policy.asp?action=read" id="form1" method="post" name="form1">
Then towards the top of the new policy page you need to add a quick check to see if the form was submitted
<%
If Request.QueryString("action")="read" Then
' # ADD SQL UPDATE STATMENT BELOW
' # NOW WE WILL REDIRECT THEM TO THE FORUM SINCE ITS BEEN UPDATED
Response.Redirect("default.asp")
End If
%>
|
Brad Oklahoma City Online Entertainment Guide Oklahoma Event Tickets |
 |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 06 June 2004 : 23:42:38
|
Excellent, thank you very much. Hopfully this will be my last newbie question:
What is the content of the SQL update string?
is it something like this:?
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS " strSql = strSql & " SET M_VIEW_POLICY = " 1 " |
-=NiteOwl=-
|
Edited by - NiteOwl on 07 June 2004 00:25:56 |
 |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 07 June 2004 : 02:52:33
|
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS SET M_VIEW_POLICY = 1"
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords |
Support Snitz Forums
|
 |
|
redbrad0
Advanced Member
    
USA
3725 Posts |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 07 June 2004 : 11:19:50
|
Looked pretty good, I inserted the code and pressed agree, it however populated all users with a 1 and not just the user I was logged in with. grin
|
-=NiteOwl=-
|
 |
|
redbrad0
Advanced Member
    
USA
3725 Posts |
Posted - 07 June 2004 : 13:32:51
|
because Davio left out a small part of the code change what davio posted to below...
strSql = "UPDATE " & strMemberTablePrefix & "MEMBERS SET M_VIEW_POLICY = 1 WHERE MEMBER_ID=" & MemberID
my_Conn.Execute(strSql),,adCmdText + adExecuteNoRecords
|
Brad Oklahoma City Online Entertainment Guide Oklahoma Event Tickets |
 |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 07 June 2004 : 21:56:55
|
YES, that did it, thank you guys, this is just too excellent!!
|
-=NiteOwl=-
|
 |
|
redbrad0
Advanced Member
    
USA
3725 Posts |
|
redbrad0
Advanced Member
    
USA
3725 Posts |
|
Davio
Development Team Member
    
Jamaica
12217 Posts |
Posted - 08 June 2004 : 23:49:52
|
Most likely niteowl is editing one of his previous topics Brad. |
Support Snitz Forums
|
 |
|
NiteOwl
Junior Member
 
Canada
403 Posts |
Posted - 09 June 2004 : 00:46:01
|
Yes, I was doing exactly that, I wanted to be clear incase somone, or even myself followed theses steps one day. grin, thanks so much again guys!!
NiteOwl |
-=NiteOwl=-
|
 |
|
redbrad0
Advanced Member
    
USA
3725 Posts |
|
Topic  |
|