How to End a DRW Function (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


octavious -> How to End a DRW Function (4/4/2005 14:29:47)


I need help with my If Then statements in this DRW. I cant seem to make the first statement work by Exiting or Ending the DRW when the value is zero (0). The other two statements work fine. I already tried:

End Function
Exit Function
End Sub
Exit Sub

I have another DRW and a CDO function at the bottom of this DRW that needs to execute with either of the 3 options above.

Am I just missing a function call or is it a syntax issue??

Any help would be great!

Octavious



<
table width="100%" border="0">


  <thead>
  </thead>
  <tbody>
    <!--#include file="../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
    </SCRIPT>
<% end if %>
<%
If request.form("ProfileID") = 0 then
End Function
ElseIf request.form("ProfileID") = 1 then
fp_sQry="INSERT INTO Profile (MemStatus, UserName, Pwd, FirstName, LastName, Email1, IPAddr, RegID, RegDate) VALUES ('Registered', '::Username::', '::Pwd::', '::FirstName::', '::LastName::', '::Email::', '::IPAddr::', ::RegID::, '::RegDate::')"
fp_sDefault="Username=&Pwd=&FirstName=&LastName=&Email=&IPAddr=&RegID=&RegDate="
ElseIf request.form("ProfileID") > 1 then
fp_sQry="UPDATE Profile SET MemStatus='Registered', UserName='::Username::', Pwd='::Pwd::', Email1='::Email::', RegID=::RegID::, RegDate='::RegDate::' WHERE ProfileID=::ProfileID::"
fp_sDefault="Username=&Pwd=&Email=&RegID=&RegDate=&ProfileID="
End If
fp_sNoRecords="<tr><font face=""Verdana"" size=""2"" color=""#FF0000"">REGISTRATION SUCCESSFUL </tr>"
fp_sDataConn="spcp"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--#include file="../_fpclass/fpdbrgn2.inc"-->




BeTheBall -> RE: How to End a DRW Function (4/4/2005 15:13:02)

How about this:

<%
If request.form("ProfileID") = 1 then
fp_sQry="INSERT INTO Profile (MemStatus, UserName, Pwd, FirstName, LastName, Email1, IPAddr, RegID, RegDate) VALUES ('Registered', '::Username::', '::Pwd::', '::FirstName::', '::LastName::', '::Email::', '::IPAddr::', ::RegID::, '::RegDate::')"
fp_sDefault="Username=&Pwd=&FirstName=&LastName=&Email=&IPAddr=&RegID=&RegDate="
ElseIf request.form("ProfileID") > 1 then
fp_sQry="UPDATE Profile SET MemStatus='Registered', UserName='::Username::', Pwd='::Pwd::', Email1='::Email::', RegID=::RegID::, RegDate='::RegDate::' WHERE ProfileID=::ProfileID::"
fp_sDefault="Username=&Pwd=&Email=&RegID=&RegDate=&ProfileID="
End If
fp_sNoRecords="<tr><font face=""Verdana"" size=""2"" color=""#FF0000"">REGISTRATION SUCCESSFUL </tr>"
fp_sDataConn="spcp"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--#include file="../_fpclass/fpdbrgn2.inc"-->
<%End If%>






octavious -> RE: How to End a DRW Function (4/4/2005 16:39:52)

Thanks Duane. Let me try that out to see what happens?




octavious -> RE: How to End a DRW Function (4/4/2005 16:50:53)

Hmmm, tried that... getting Page cannot display error. As if some kind of syntax error.

Also, you removed the Script Language stuff at top and the other <!--#include file="../_fpclass/fpdblib.inc"-->

Am I to completely revise my original code to exactly what you have given me?

Just a bit confused, probably!

Octavious




BeTheBall -> RE: How to End a DRW Function (4/4/2005 17:03:27)

Sorry, poor communication on my part. My intention was that you would replace this section of your code:

<%
If request.form("ProfileID") = 0 then
End Function
ElseIf request.form("ProfileID") = 1 then
fp_sQry="INSERT INTO Profile (MemStatus, UserName, Pwd, FirstName, LastName, Email1, IPAddr, RegID, RegDate) VALUES ('Registered', '::Username::', '::Pwd::', '::FirstName::', '::LastName::', '::Email::', '::IPAddr::', ::RegID::, '::RegDate::')"
fp_sDefault="Username=&Pwd=&FirstName=&LastName=&Email=&IPAddr=&RegID=&RegDate="
ElseIf request.form("ProfileID") > 1 then
fp_sQry="UPDATE Profile SET MemStatus='Registered', UserName='::Username::', Pwd='::Pwd::', Email1='::Email::', RegID=::RegID::, RegDate='::RegDate::' WHERE ProfileID=::ProfileID::"
fp_sDefault="Username=&Pwd=&Email=&RegID=&RegDate=&ProfileID="
End If
fp_sNoRecords="<tr><font face=""Verdana"" size=""2"" color=""#FF0000"">REGISTRATION SUCCESSFUL </tr>"
fp_sDataConn="spcp"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--#include file="../_fpclass/fpdbrgn2.inc"-->


with what I placed above. Also, to see the true error, go into IE and choose, Tools - Internet Options and click the Advanced tab. Then scroll down to the box labeled, "Show friendly http error messages" and uncheck it.




octavious -> RE: How to End a DRW Function (4/4/2005 17:20:01)

This is the error I get..

Microsoft VBScript compilation error '800a0400'

Expected statement

/admin_spcp/admin_updateregistry.asp, line 77

End If



Am I still missing something?

This is the code now:

<table width="100%" border="0">


  <thead>
  </thead>
  <tbody>
    <!--#include file="../_fpclass/fpdblib.inc"-->
    <% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
    </SCRIPT>
<% end if %>

<%
If request.form("ProfileID") = 1 then
fp_sQry="INSERT INTO Profile (MemStatus, UserName, Pwd, FirstName, LastName, Email1, IPAddr, RegID, RegDate) VALUES ('Registered', '::Username::', '::Pwd::', '::FirstName::', '::LastName::', '::Email::', '::IPAddr::', ::RegID::, '::RegDate::')"
fp_sDefault="Username=&Pwd=&FirstName=&LastName=&Email=&IPAddr=&RegID=&RegDate="
ElseIf request.form("ProfileID") > 1 then
fp_sQry="UPDATE Profile SET MemStatus='Registered', UserName='::Username::', Pwd='::Pwd::', Email1='::Email::', RegID=::RegID::, RegDate='::RegDate::' WHERE ProfileID=::ProfileID::"
fp_sDefault="Username=&Pwd=&Email=&RegID=&RegDate=&ProfileID="
End If
fp_sNoRecords="<tr><font face=""Verdana"" size=""2"" color=""#FF0000"">REGISTRATION SUCCESSFUL </tr>"
fp_sDataConn="spcp"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--#include file="../_fpclass/fpdbrgn2.inc"-->
<%End If%>


Thanks Duane

Octavious





BeTheBall -> RE: How to End a DRW Function (4/4/2005 17:25:05)

We have an extra, "End If". Try this:


<table width="100%" border="0">


  <thead>
  </thead>
  <tbody>
    <!--#include file="../_fpclass/fpdblib.inc"-->
    <% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
    </SCRIPT>
<% end if %>

<%
If request.form("ProfileID") = 1 then
fp_sQry="INSERT INTO Profile (MemStatus, UserName, Pwd, FirstName, LastName, Email1, IPAddr, RegID, RegDate) VALUES ('Registered', '::Username::', '::Pwd::', '::FirstName::', '::LastName::', '::Email::', '::IPAddr::', ::RegID::, '::RegDate::')"
fp_sDefault="Username=&Pwd=&FirstName=&LastName=&Email=&IPAddr=&RegID=&RegDate="
ElseIf request.form("ProfileID") > 1 then
fp_sQry="UPDATE Profile SET MemStatus='Registered', UserName='::Username::', Pwd='::Pwd::', Email1='::Email::', RegID=::RegID::, RegDate='::RegDate::' WHERE ProfileID=::ProfileID::"
fp_sDefault="Username=&Pwd=&Email=&RegID=&RegDate=&ProfileID="
fp_sNoRecords="<tr><font face=""Verdana"" size=""2"" color=""#FF0000"">REGISTRATION SUCCESSFUL </tr>"
fp_sDataConn="spcp"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--#include file="../_fpclass/fpdbrgn2.inc"-->
<%End If%>




octavious -> RE: How to End a DRW Function (4/4/2005 17:47:45)

We're getting close...

A zero entry works.

A number greater than 1 works..

... but the first If statement of equal to 1 does not work. I can see that it doesnt get to this part of the code...

fp_sNoRecords="<tr><font face=""Verdana"" size=""2"" color=""#FF0000"">REGISTRATION SUCCESSFUL </tr>"
fp_sDataConn="spcp"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID

....and just ends the function!

Any other suggestions...

Octavious




octavious -> RE: How to End a DRW Function (4/4/2005 17:54:01)

Im thinking... is there a way for me to start my redirection or If/then statement before this DRW.

If equal to zero, bypass this DRW all together and go to the next DRW.

Do ASP pages read from top to bottom? Im more familiar with Access coding. This is all fairly new to me.

I have this other DRW at bottom this first one. Im thinking, if I can assign a name to each of the DRW, do an
If/Then at the top making it go to the correct set of DRW based on the entry for Profile ID.

Is this possible?

Octavious





BeTheBall -> RE: How to End a DRW Function (4/4/2005 18:14:19)

Sorry, I am a little thick-headed today. Give this one a try:

<table width="100%" border="0">


  <thead>
  </thead>
  <tbody>
    <!--#include file="../_fpclass/fpdblib.inc"-->
    <% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
    </SCRIPT>
<% end if %>
<%
If request.form("ProfileID") <> 0 then
%>
<%
If request.form("ProfileID") = 1 then
fp_sQry="INSERT INTO Profile (MemStatus, UserName, Pwd, FirstName, LastName, Email1, IPAddr, RegID, RegDate) VALUES ('Registered', '::Username::', '::Pwd::', '::FirstName::', '::LastName::', '::Email::', '::IPAddr::', ::RegID::, '::RegDate::')"
fp_sDefault="Username=&Pwd=&FirstName=&LastName=&Email=&IPAddr=&RegID=&RegDate="
Else
request.form("ProfileID") > 1 then
fp_sQry="UPDATE Profile SET MemStatus='Registered', UserName='::Username::', Pwd='::Pwd::', Email1='::Email::', RegID=::RegID::, RegDate='::RegDate::' WHERE ProfileID=::ProfileID::"
End If
fp_sDefault="Username=&Pwd=&Email=&RegID=&RegDate=&ProfileID="
fp_sNoRecords="<tr><font face=""Verdana"" size=""2"" color=""#FF0000"">REGISTRATION SUCCESSFUL </tr>"
fp_sDataConn="spcp"
fp_iMaxRecords=256
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=True
fp_fMenuFormat=False
fp_sMenuChoice=""
fp_sMenuValue=""
fp_sColTypes="&"
fp_iDisplayCols=16
fp_fCustomQuery=True
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->
<!--#include file="../_fpclass/fpdbrgn2.inc"-->
<%End If%>




octavious -> RE: How to End a DRW Function (4/4/2005 19:09:53)

You are the BOMB! or should I say... onTHe Ball!

It works. Thanks...

I do have another question... I hope you are not getting sick of me yet..

I have a registration form that needs to first verify if the username entered is allready taken by another member.

It then passes this information on a second page that includes that DRW verying the username. All the input from the first page passes ok by using the <%=Server.HtmlEncode(Request("FIRSTNAME"))%> and the form indicates that the username is already taken.

I used the fp_norecords to redirect to another ASP page if username not taken.

fp_sNoRecords="<Script>window.location='registration_verify.asp';</Script>"

My dilema is that the values from that very page does not carry over to this third page... Is there another way to do this???

Thanks again for all your help and patience with me...

Octavious





BeTheBall -> RE: How to End a DRW Function (4/4/2005 19:31:11)

You will lose the request.form variables when you go through a redirect. You could use session variables. On the page that does the redirect, assign your form values to session variables. For example:

Session("FIRSTNAME") = Request.Form("FIRSTNAME")

Then, on the page that inserts the record, you will have to modify your SQL string to use the Session variables. You must diet the DRW. Then, you will use something like:

INSERT INTO tblName (field1, field2, field3) VALUES ('"&Session("FIRSTNAME")&"', '"&Session("LASTNAME")&"', '"&Session("BLAHBLAHBLAH")&"'))

That ought to do it.




octavious -> RE: How to End a DRW Function (4/4/2005 20:01:11)


This is the current code I have:

fp_sQry="SELECT * FROM Profile WHERE (Username =  '::Username::')"
fp_sDefault=""
fp_sNoRecords="<Script>window.location='registration_verify.asp';</Script>"
fp_sDataConn="spcp"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice="ProfileID"
fp_sMenuValue="ProfileID"
fp_sColTypes="&ProfileID=3&FirstName=202&LastName=202&MarriedLName=202&Address=202&City=202&Zip=202&State=202&Country=202&Email2=202&Email1=202&HomeTel=202&HomeTel2=202&HomeTelDesc=202&Employer=202&WorkTel=202&WorkTelDesc=202&Cell=202&CellDesc=202&Website=202&77Photo=202&Photo77=202&CurPhoto=202&NoKids=3&KidsNames=202&KidsAge=202&Status=202&HSWanted2Be=202&NowBecame=202&HusbandName=202&HSNickname=202&HSMemorable=203&HSEmbarrasing=203&MyComments=203&Username=202&Password=202&Pwd=202&BirthDate=135&Opt1=3&Opt2=3&Opt3=3&Opt4=202&Opt5=202&Opt6=202&DateStamp=135&IPAddr=202&Display=202&MemType=202&MemStatus=202&RegID=3&RegDate=135&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>



Im using the fp_norecords... to redirect to the third page if this page has no matching records for the username.

Where do I insert those Session parameters? That third page is another submit form which will be an add to database if the username entered this time is not taken. If so, I will simply loop it back to this form again. It would be nice if the user didnt have to re-enter all the inputs again.

I hope this is making sense.

Octavious





Spooky -> RE: How to End a DRW Function (4/4/2005 20:25:11)

You could add it to your redirect here :
fp_sNoRecords="<Script>window.location='registration_verify.asp?Username="&Request.Form("Username")&"';</Script>"




octavious -> RE: How to End a DRW Function (4/4/2005 20:54:49)

Thanks for the reply Spooky... Unfortunately, what I call as my second page or verification page really did not do anything except pass the username value into a DRW just to find if it matches one that is already there. No add or edit happenedd.

This page also includes a submit form with the same exact fields as the first one and was populated with values.

Now that it determined that the username has not been used, it will redirect to the third (another input form) page where the user will now submit/add into the database. Basically, the user never sees this second page when the error occured.

What I need is to have the value inputed in that first form, carry over to the third form from the redirect of the no records from the DRW of this second form. This is more convenience so that the user does not have to re-enter the values.

Gosh, am I making sense???

Octavious





Spooky -> RE: How to End a DRW Function (4/4/2005 21:03:25)

The code you have above - thats page 2?




octavious -> RE: How to End a DRW Function (4/4/2005 21:20:29)

Yes, here is the full page:

<%
' FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit.

On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Session.LCID = 1033
Err.Clear

strErrorUrl = "registration_username.asp"

If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "0" Then
	Err.Clear

	Set fp_conn =  Server.CreateObject("ADODB.Connection")
	FP_DumpError strErrorUrl, "Cannot create connection"

	Set fp_rs = Server.CreateObject("ADODB.Recordset")
	FP_DumpError strErrorUrl, "Cannot create record set"

	fp_conn.Open Application("spcp_ConnectionString")
	FP_DumpError strErrorUrl, "Cannot open database"

	fp_rs.Open "Registry", fp_conn, 1, 3, 2 ' adOpenKeySet, adLockOptimistic, adCmdTable
	FP_DumpError strErrorUrl, "Cannot open record set"

	fp_rs.AddNew
	FP_DumpError strErrorUrl, "Cannot add new record set to the database"
	Dim arFormFields0(6)
	Dim arFormDBFields0(6)
	Dim arFormValues0(6)

	arFormFields0(0) = "FIRSTNAME"
	arFormDBFields0(0) = "FirstName"
	arFormValues0(0) = Request("FIRSTNAME")
	arFormFields0(1) = "USERNAME"
	arFormDBFields0(1) = "UserName"
	arFormValues0(1) = Request("USERNAME")
	arFormFields0(2) = "DISPLAY"
	arFormDBFields0(2) = "Display"
	arFormValues0(2) = Request("DISPLAY")
	arFormFields0(3) = "EMAIL"
	arFormDBFields0(3) = "Email"
	arFormValues0(3) = Request("EMAIL")
	arFormFields0(4) = "LASTNAME"
	arFormDBFields0(4) = "LastName"
	arFormValues0(4) = Request("LASTNAME")
	arFormFields0(5) = "passwd1"
	arFormDBFields0(5) = "Pwd"
	arFormValues0(5) = Request("passwd1")

	FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0

	If Request.ServerVariables("REMOTE_HOST") <> "" Then
		FP_SaveFieldToDB fp_rs, Request.ServerVariables("REMOTE_HOST"), "IPAddr"
	End If
	FP_SaveFieldToDB fp_rs, Now, "DateStamp"

	fp_rs.Update
	FP_DumpError strErrorUrl, "Cannot update the database"

	fp_rs.Close
	fp_conn.Close

	Session("FP_SavedFields")=arFormFields0
	Session("FP_SavedValues")=arFormValues0
	Session.CodePage = Session("FP_OldCodePage")
	Session.LCID = Session("FP_OldLCID")
	Response.Redirect "registration_confirm.asp"

End If
End If

Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")

%>
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Registration</title>
</head>

<body>

 <SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT">
		<!-- Hide script from older browsers

		function validForm(passForm) {
			if (passForm.passwd1.value == "") {
				alert("You must enter a password")
				passForm.passwd1.focus()
				return false
			}
			if (passForm.passwd1.value != passForm.passwd2.value) {
				alert("Entered passwords did not match")
				passForm.passwd1.focus()
				passForm.passwd1.select()
				return false
			}
			return true
		}
		
		// End hiding script -->
	</SCRIPT>	


<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" 
bordercolor="#111111" width="425" id="AutoNumber1" height="450">
  <tr>
    <td width="100%" align="left" valign="top" height="180" colspan="3"><b>
    <font size="4" 
    color="#008000" face="Verdana"><i>Username taken . . .</i></font></b><p><font face="Verdana" 
    size="2" color="#808080">The Username you have entered: </font> <b><font size="2" color="#008000" face="Verdana"><%=Server.HtmlEncode(Request("USERNAME"))%></font></b><br>
    <font face="Verdana" size="2" color="#808080">is already taken by another member. <br>
    <br>
    Please re-enter a different Username and Click Register.<br>
</font><!--#include file="../_fpclass/fpdblib.inc"-->
<% if 0 then %>
<SCRIPT Language="JavaScript">
document.write("<div style='background: yellow; color: black;'>The Database Results component on this page is unable to display database content. The page must have a filename ending in '.asp', and the web must be hosted on a server that supports Active Server Pages.</div>");
    </SCRIPT>
<% end if %>
<%
fp_sQry="SELECT * FROM Profile WHERE (Username =  '::Username::')"
fp_sDefault=""
fp_sNoRecords="<Script>window.location='registration_verify.asp';</Script>"
fp_sDataConn="spcp"
fp_iMaxRecords=1
fp_iCommandType=1
fp_iPageSize=0
fp_fTableFormat=False
fp_fMenuFormat=False
fp_sMenuChoice="ProfileID"
fp_sMenuValue="ProfileID"
fp_sColTypes="&ProfileID=3&FirstName=202&LastName=202&MarriedLName=202&Address=202&City=202&Zip=202&State=202&Country=202&Email2=202&Email1=202&HomeTel=202&HomeTel2=202&HomeTelDesc=202&Employer=202&WorkTel=202&WorkTelDesc=202&Cell=202&CellDesc=202&Website=202&77Photo=202&Photo77=202&CurPhoto=202&NoKids=3&KidsNames=202&KidsAge=202&Status=202&HSWanted2Be=202&NowBecame=202&HusbandName=202&HSNickname=202&HSMemorable=203&HSEmbarrasing=203&MyComments=203&Username=202&Password=202&Pwd=202&BirthDate=135&Opt1=3&Opt2=3&Opt3=3&Opt4=202&Opt5=202&Opt6=202&DateStamp=135&IPAddr=202&Display=202&MemType=202&MemStatus=202&RegID=3&RegDate=135&"
fp_iDisplayCols=1
fp_fCustomQuery=False
BOTID=0
fp_iRegion=BOTID
%>
<!--#include file="../_fpclass/fpdbrgn1.inc"-->

<%=FP_FieldVal(fp_rs,"ProfileID")%>
<%=FP_FieldVal(fp_rs,"Firstname")%>

<!--#include file="../_fpclass/fpdbrgn2.inc"-->

</td>
  </tr>
  <tr>
    <td width="50" align="left" valign="top" height="250"> </td>
    <td width="325" align="center" valign="top" height="250" bgcolor="#BBBBA6" 
    style="border: 1px solid #808080">
<FORM onSubmit="return validForm(this)" ACTION="--WEBBOT-SELF--" method="POST">
	<!--webbot bot="SaveDatabase" suggestedext="asp" u-asp-include-url="../_fpclass/fpdbform.inc" 
    s-dataconnection="spcp" s-recordsource="Registry" u-database-url="../fpdb/spcp.mdb" 
    u-confirmation-url="registration_confirm.asp" 
    u-validation-error-url="registration_username.asp" s-builtin-fields="REMOTE_HOST Timestamp" 
    s-builtin-dbfields="IPAddr DateStamp" 
    s-form-fields="FIRSTNAME USERNAME DISPLAY EMAIL LASTNAME passwd1" 
    s-form-dbfields="FirstName UserName Display Email LastName Pwd" startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include file="../_fpclass/fpdbform.inc"--><!--webbot 
    bot="SaveDatabase" endspan i-checksum="34604" --><p><font face="Verdana" size="1"><br>
    FIRST NAME<br>
<INPUT SIZE="30" name="FIRSTNAME" 
    
    style="font-family: Verdana; font-size: 8pt; border: 1px dotted #008000; background-color: #C0C0C0" 
    value="<%=Server.HtmlEncode(Request("FIRSTNAME"))%>">
    <br>
    LAST NAME (IN HIGH SCHOOL)<br>
<INPUT SIZE="30" name="LASTNAME" 
    
    style="font-family: Verdana; font-size: 8pt; border: 1px dotted #008000; background-color: #C0C0C0" 
    value="<%=Server.HtmlEncode(Request("LASTNAME"))%>"><br>
    EMAIL ADDRESS<br>
<INPUT SIZE="30" name="EMAIL" 
    
    
    style="font-family: Verdana; font-size: 8pt; border: 1px dotted #008000; background-color: #C0C0C0" 
    value="<%=Server.HtmlEncode(Request("EMAIL"))%>">
    <br>
    <br>
    <font color="#008000">ENTER A NEW
    USERNAME<br>
    (4 TO 16 CHARACTERS)<br>
    </font>
    <INPUT SIZE="20" name="USERNAME" 
    
    
    style="font-family: Verdana; font-size: 8pt; border: 1px dotted #008000; background-color: #008000" 
    value="<%=Server.HtmlEncode(Request("USERNAME"))%>"><br>
    CHOOSE A PASSWORD<br>
<INPUT TYPE="password" NAME="passwd1" size="20" 
    
    style="font-family: Verdana; font-size: 8pt; border: 1px dotted #008000; background-color: #C0C0C0" 
    value="<%=Server.HtmlEncode(Request("passwd1"))%>"><br>
    VERIFY PASSWORD<br>
    </font> <INPUT TYPE="password" NAME="passwd2" size="20" 
    
    style="font-family: Verdana; font-size: 8pt; border: 1px dotted #008000; background-color: #C0C0C0" 
    value="<%=Server.HtmlEncode(Request("passwd2"))%>"><br>
    <INPUT TYPE="submit" VALUE="REGISTER" style="font-family: Verdana; font-size: 8pt"> 
    <INPUT TYPE="reset" style="font-family: Verdana; font-size: 8pt"> <br>
    <font face="Verdana" size="1">ALL FIELDS ARE REQUIRED FOR REGISTRATION</font></p>
    <input type="hidden" name="DISPLAY" value="Y">
</FORM>
    </td>
    <td width="50" align="left" valign="top" height="250"> </td>
  </tr>
  </table>

</body>

</html>


The third page will look at lot like this as it will loop back just incase they input another usename that is already taken.

The values of the fields is what I need to carry over.

Octavious





Spooky -> RE: How to End a DRW Function (4/4/2005 21:23:46)

Thats what I mean above - this page then redirects on no records, using this code :

fp_sNoRecords="<Script>window.location='registration_verify.asp';</Script>"

and goes to your 3rd page. This third page is where you want the values from page 2 that havent been used?




octavious -> RE: How to End a DRW Function (4/4/2005 21:27:26)

Yes, Im sorry, that's it!

Although I am wondering if Im going about this the wrong way. Im just thinking what will happen if
they do enter another username that is already taken?

Any suggestions??

Octavious




Spooky -> RE: How to End a DRW Function (4/4/2005 21:41:19)

Assuming the orignal redirect works, what problem was there with this code?

fp_sNoRecords="<Script>window.location='registration_verify.asp?Username="&Request.Form("Username")&"';</Script>"

How does page 3 (registration_verify.asp) use it?




octavious -> RE: How to End a DRW Function (4/4/2005 21:51:45)

Your code looks good and I know it will work.. however, I need to also pass the other values entered such as

FirstName
LastName
Password
Email
RegistrationID
RegTimeStamp

...so that they populate that 3rd form. Then from this form they will simply verify the entry and submit - which will be an add to the database. I figure it they make it to this 3rd form, then the username entered is available.

Octavious








Spooky -> RE: How to End a DRW Function (4/4/2005 22:48:28)

Youll extend it like so :
fp_sNoRecords="<Script>window.location='registration_verify.asp?Username="&Request.Form("Username")&"&Email="&request.form("email")&"&Firstname="&request.form("firstname")&"';</Script>"




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.140625