Solved

Classic ASp -  txtemailid  Session Variable not going through

Posted on 2008-10-17
5
1,499 Views
Last Modified: 2012-05-05
Hi I have a registration form that should pass the values to a page which will an email sendin cdosys,  the problem is that the variable is somehow not being passed and i get

CDO.Message.1 error '8004020c'

At least one recipient is required, but none were found

index.asp (get the form values and validates)
 

<% 

	level="../"
 

if (Request.Form("Submit")="") then

%>

<!-- #include file="session_destroy.asp"-->

<%end if%>
 

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

<!--include file="../include/connection.asp"-->

<!--#include file="../../Connections/sqlConn1.asp" -->
 

<!-- Include file for CAPTCHA configuration -->

<!-- #include file="CAPTCHA/CAPTCHA_configuration.asp" -->
 
 
 

<html>

<head>

<title><%=PageTitle%></title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="../style/style.css" rel="stylesheet" type="text/css">
 

<script type="text/javascript">

<!--

function MM_validateForm() { //v4.0

  if (document.getElementById){

    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;

    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);

      if (val) { nm=val.name; if ((val=val.value)!="") {

        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');

          if (p<1 || p==(val.length-1)) errors+='- email field must contain a valid e-mail address.\n';

        } else if (test!='R') { num = parseFloat(val);

          if (isNaN(val)) errors+='- zip code field must contain only numbers.\n';

          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');

            min=test.substring(8,p); max=test.substring(p+1);

            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';

      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }

    } if (errors) alert('The following error(s) occurred:\n'+errors);

    document.MM_returnValue = (errors == '');

} }

function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}
 

function YY_checkform() { //v4.66

//copyright (c)1998,2002 Yaromat.com

  var args = YY_checkform.arguments; var myDot=true; var myV=''; var myErr='';var addErr=false;var myReq;

  for (var i=1; i<args.length;i=i+4){

    if (args[i+1].charAt(0)=='#'){myReq=true; args[i+1]=args[i+1].substring(1);}else{myReq=false}

    var myObj = MM_findObj(args[i].replace(/\[\d+\]/ig,""));

    myV=myObj.value;

    if (myObj.type=='text'||myObj.type=='password'||myObj.type=='hidden'){

      if (myReq&&myObj.value.length==0){addErr=true}

      if ((myV.length>0)&&(args[i+2]==1)){ //fromto

        var myMa=args[i+1].split('_');if(isNaN(myV)||myV<myMa[0]/1||myV > myMa[1]/1){addErr=true}

      } else if ((myV.length>0)&&(args[i+2]==2)){

          var rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-z]{2,4}$");if(!rx.test(myV))addErr=true;

      } else if ((myV.length>0)&&(args[i+2]==3)){ // date

        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);

        if(myAt){

          var myD=(myAt[myMa[1]])?myAt[myMa[1]]:1; var myM=myAt[myMa[2]]-1; var myY=myAt[myMa[3]];

          var myDate=new Date(myY,myM,myD);

          if(myDate.getFullYear()!=myY||myDate.getDate()!=myD||myDate.getMonth()!=myM){addErr=true};

        }else{addErr=true}

      } else if ((myV.length>0)&&(args[i+2]==4)){ // time

        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);if(!myAt){addErr=true}

      } else if (myV.length>0&&args[i+2]==5){ // check this 2

            var myObj1 = MM_findObj(args[i+1].replace(/\[\d+\]/ig,""));

            if(myObj1.length)myObj1=myObj1[args[i+1].replace(/(.*\[)|(\].*)/ig,"")];

            if(!myObj1.checked){addErr=true}

      } else if (myV.length>0&&args[i+2]==6){ // the same

            var myObj1 = MM_findObj(args[i+1]);

            if(myV!=myObj1.value){addErr=true}

      }

    } else

    if (!myObj.type&&myObj.length>0&&myObj[0].type=='radio'){

          var myTest = args[i].match(/(.*)\[(\d+)\].*/i);

          var myObj1=(myObj.length>1)?myObj[myTest[2]]:myObj;

      if (args[i+2]==1&&myObj1&&myObj1.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}

      if (args[i+2]==2){

        var myDot=false;

        for(var j=0;j<myObj.length;j++){myDot=myDot||myObj[j].checked}

        if(!myDot){myErr+='* ' +args[i+3]+'\n'}

      }

    } else if (myObj.type=='checkbox'){

      if(args[i+2]==1&&myObj.checked==false){addErr=true}

      if(args[i+2]==2&&myObj.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}

    } else if (myObj.type=='select-one'||myObj.type=='select-multiple'){

      if(args[i+2]==1&&myObj.selectedIndex/1==0){addErr=true}

    }else if (myObj.type=='textarea'){

      if(myV.length<args[i+1]){addErr=true}

    }

    if (addErr){myErr+='* '+args[i+3]+'\n'; addErr=false}

  }

  if (myErr!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+myErr)}

  document.MM_returnValue = (myErr=='');

}

//-->

</script>
 

<script language="JavaScript">

<!--

function isAlpha ( evt ) {

   var keyCode = evt.which ? evt.which : evt.keyCode;

   alpha = ( keyCode >= 'a'.charCodeAt ( ) &&

      keyCode <= 'z'.charCodeAt ( ) ) || 

      ( keyCode >= 'A'.charCodeAt ( ) &&

      keyCode <= 'Z'.charCodeAt ( ) ) || 

      ( keyCode >= 8 && keyCode <= 46 );

   return ( alpha );

}
 

function validateAlpha ( text ) {

   for ( c=0; c < text.length; c ++ ) {

      alpha = ( text.charCodeAt ( c ) >= 65 &&

         text.charCodeAt ( c ) <=90 ) || 

         ( text.charCodeAt ( c ) >= 97 &&

         text.charCodeAt ( c ) <=122 )

      if ( !alpha ) {

         alert ( 'No way, sorry.' );   

         document.theForm.theField.select ( );

         return false;

      }

   }

   return true;

}

//-->

</script>
 
 

</head>

<%

' Member Registration 

	if 		(Request.Form("Submit")<>"") then

								

			txtcourseid=request.form("txtcourseid")

			txtmemberid=request.form("txtmemberid")

			txtemailid=request.form("txtemailid")

			session("S_txtfname")=request.form("txtfname")

			session("S_txtlname")=request.form("txtlname")

			session("S_txtaddr1")=request.form("txtaddr1")

			session("S_txtaddr2")=request.form("txtaddr2")

			session("S_txtcity")=request.form("txtcity")

			session("S_txtstate")=request.form("txtstate")

			session("S_txtcourseid")=request.form("txtcourseid")

			session("S_txtmemberid")=request.form("txtmemberid")

			session("S_txtpcode")=request.form("txtpcode")

			session("S_txtcontactno")=request.form("txtcontactno")

			session("S_txtemailid")=request.form("txtemailid")

			session("S_txtuname")=request.form("txtuname")

			session("S_txtpwd")=request.form("txtpwd")	

			session("S_securitycode")= request.form("securityCode")

	

	

	    

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''		
 

' is catching only if double user id entered  is checking it but only if user id alrwady exists 

' in here 
 

txtemailid = Request.Form("txtemailid") ' this is where i get the email from the form 

sql7 = " Select Email from Players Where Email = '"&txtemailid&"'"
 
 

set rs7 = Server.Createobject("ADODB.Recordset")

set rs7=conSQL.execute(sql7)

if not rs7.EOF then %>
 

<script language='Javascript'>

	alert('The Enter E-Mail already exist on our database , please enter a different e-mail ....'); 

						history.go(-1);

						</script>	

<% End If %>

<%
 

		'toaddress = Request.Form("recipient")

  		'.To = "&toaddress&"

					

		txtuname=request.form("txtuname")

		set rs = Server.Createobject("ADODB.Recordset")

		sql = "select * from Players where SSN='"&txtuname&"'"

		rs.open sql,conSQL

		if rs.BOF then 

		set rs2 = Server.Createobject("ADODB.Recordset")

		sql1 = "select count(*) as memcon from Players where courseID="&txtcourseid&" and memberid='"&txtmemberid&"'"

		sql11 = "select count(*) as memcon from Players where courseID="&txtcourseid&" and Email='"&txtemailid&"'"

		set rs2=conSQL.execute(sql1)

		set rs2=conSQL.execute(sql11)

		if rs2("memcon") <> 0 then	%>

			

			

	<script language='Javascript'>

	alert('The Member Id in the selected course is Already Exists, Try Again....'); 

						history.go(-1);

						

					</script>

		<%	else	

		  	response.redirect "succeedpayment.asp"

			end if		

		else 

		%>

        

			<script language='Javascript'>

		  		alert('Username Already Exists, Try Again....') 

				history.go(-1)	

			</script>

			<%		

		end if

		'rs2.close

		'set rs2=nothing

	rs.close

	set rs = nothing 

	end if	

%>

<script language="JavaScript">

	function validate_all()

	{

		errmsg="";
 

		if (document.regfrm.txtfname.value=="")

			errmsg = " Firstname Field is Blank \n";

		if (document.regfrm.txtaddr1.value=="")

			errmsg += " Address Field is Blank \n";

		if (document.regfrm.txtcity.value=="")

			errmsg += " City Field is Blank \n";		

		if (document.regfrm.txtstate.value=="")

			errmsg += " State Field is Blank \n";

		if (document.regfrm.txtpcode.value=="")

			errmsg += " Zip Code Field is Blank \n";		

		if (document.regfrm.txtcontactno.value=="")

			errmsg += " Contact Number Field is Blank \n";		

		if (document.regfrm.txtemailid.value=="")

			errmsg += " Email ID Field is Blank \n";		

		else

		{

			var err=0

			mailid = document.regfrm.txtemailid.value;

			val=mailid.indexOf("@");

			if (val!=-1)

			{

			  val1=mailid.indexOf(".");

			  if (val1==-1)

				err=1;	

			}  

			else

				err=1;

			

			if (err==1)

				  errmsg += " Invalid Email ID \n";

		}

		if (document.regfrm.txtcourseid.value=="")

			errmsg += " Choose the Any one of the Course \n";

		if (document.regfrm.txtmemberid.value=="")

			errmsg += " GolfCourse membership Id Field is Blank \n";		

		if (document.regfrm.txtmemberid.value=="")

			errmsg += " GolfCourse membership Id Field is Blank \n";

		if (document.regfrm.txtuname.value=="")

			errmsg += " Username Field is Blank \n";		

		if (document.regfrm.txtpwd.value=="")

			errmsg += " Password Field is Blank \n";		

		else if (document.regfrm.txtpwd.value!=document.regfrm.txtcpwd.value)

			errmsg += " Confirm Password Doesn't Match with Original Password \n";		

	if (errmsg=="")         

	{

		return true;

	}

	else

	{

		alert(" Following Error Have Occured While Submiting This Form:\n\n"+errmsg);

		return false;

	}

}	

</script>
 
 

<body background="<%=level%>images/bg.jpg" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table width="516" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr> 

    <td colspan="4" valign="top"><font face="Tahoma" size="2"><!--#include file="../include/header.asp"-->

	</font></td>

  </tr>

  <tr>

    <td width="192" valign="top" bgcolor="#ffffff"><font face="Tahoma" size="2">

      <!-- #include file="../include/left.asp" -->

	</font>

	</td>

    <td width="456" valign="top" bgcolor="#ffffff">

   

   

    <%

If Request.Querystring("err") = "captcha" then

%>

<div align="center" style="color: red;">There was an error with the letters you entered.  Please look at the image in the form and type the letters you see.</div>

<%

End if

%>
 

   

      <form name="regfrm" method="post" action="succeedpayment.asp" onSubmit="return validateNumber(this.theField.value )">

	  <font face="Tahoma" size="2">

	  <% if (msg<>"") then %>

        </font>

        <table width="88%" border="0" align="center" cellpadding="0" cellspacing="0">

          <tr> 

            <td width="100%" height="30" colspan="2" align="center">

			<font face="Tahoma" size="2"><%=msg%></font></td>

          </tr>

        </table>

       <font face="Tahoma" size="2">

       <% end if %>

        </font>

        <table width="423"  border="0" cellspacing="0" cellpadding="0" align="center" class="bodytxt1">

          <tr>

            <td width="28"><font face="Tahoma" size="2"><img src="<%=Level%>images/tbleft.jpg" width="28" height="24"></font></td>

            <td width="201" class="tableheader1"><font face="Tahoma" size="2"> New User Sign Up &nbsp;</font>			</td>

            <td width="194"><font face="Tahoma" size="2"><img src="<%=Level%>images/tbright.jpg" width="28" height="24"></font></td>

          </tr>

          <tr> 

            <td colspan="3" valign="top" bgcolor="#5eb020"> 

              <table width="100%"  border="0" cellspacing="1" cellpadding="0">

                <tr> 

                  <td valign="top" bgcolor="#FFFFFF" class="tablebgcolor"> 

                    <table width="100%" height="100%" align="center" cellpadding="5" cellspacing="0" class="bodytxt1" >

                      <tr align="left">

                        <td colspan="2" class="tableheader" >

						<font face="Tahoma" size="2">Personal Information</font></td>

                      </tr>

                      <tr> 

                        <td width="40%" align="right" >

						<font face="Tahoma" size="2">First 

                          Name</font></td>

                        <td width="60%"><font face="Tahoma"><font size="2">&nbsp; 

                         

                          </font> 

                         

         <input name="txtfname" type="text" class="txtbox1" id="txtfname" onKeyDown="

   if ( !isAlpha ( event ) ) {

      alert ( 'Please enter only letters on this field .' );

      return false;

   }">
 

                        </font></td>

                      </tr>

                      <tr> 

                        <td width="40%" align="right" >

						<font face="Tahoma" size="2">Last Name</font></td>

                        <td width="60%"><font face="Tahoma"><font size="2">&nbsp; 

                         

                          </font> 

                         

                          <input name="txtlname" type="text" class="txtbox1" id="txtlname" onKeyDown="

   if ( !isAlpha ( event ) ) {

      alert ( 'Please enter only letters on this field .' );

      return false;

   }">

                          <font size="2">

						</font></font>

                        </td>

                      </tr>

                      <tr> 

                        <td width="40%" align="right" >

						<font face="Tahoma" size="2">Address</font></td>

                        <td width="60%"><font face="Tahoma"><font size="2">&nbsp; 

                         

                          </font> 

                         

                          <input type="text" name="txtaddr1" class="txtbox2"></font></td>

                      </tr>

                      <tr> 

                        <td width="40%" >&nbsp;</td>

                        <td width="60%"><font face="Tahoma"><font size="2">&nbsp; 

                         

                          </font> 

                         

                          <input type="text" name="txtaddr2" class="txtbox2"></font></td>

                      </tr>

                      <tr> 

                        <td width="40%" align="right" >

						<font face="Tahoma" size="2">City 

                       

                        </font> 

                       

                        </td>

                        <td width="60%"><font face="Tahoma"><font size="2">&nbsp; 

                          </font> 

                          <input type="text" name="txtcity" class="txtbox1" onKeyDown="

   if ( !isAlpha ( event ) ) {

      alert ( 'Please enter only letters on this field .' );

      return false;

   }">

   

   </font></td>

                      </tr>

                      <tr> 

                        <td width="40%" align="right" >

						<font face="Tahoma" size="2">State</font></td>

                        <td width="60%"><font face="Tahoma"><font size="2">&nbsp; 

                         

                          </font> 

                                                   

                          <select name="txtstate" class="txtbox1">

                            <option selected>--Choose a State--</option>

                            <option value="AL">Alabama</option>

                            <option value="AK">Alaska</option>

                            <option value="AZ">Arizona</option>

                            <option value="AR">Arkansas</option>

                            <option value="CA">California</option>

                            <option value="CO">Colorado</option>

                            <option value="CT">Connecticut</option>

                            <option value="DE">Delaware</option>

                            <option value="FL">Florida</option>

                            <option value="GA">Georgia</option>

                            <option value="HI">Hawaii</option>

                            <option value="ID">Idaho</option>

                            <option value="IL">Illinois</option>

                            <option value="IN">Indiana</option>

                            <option value="IA">Iowa</option>

                            <option value="KS">Kansas</option>

                            <option value="KY">Kentucky</option>

                            <option value="LA">Louisiana</option>

                            <option value="ME">Maine</option>

                            <option value="MD">Maryland</option>

                            <option value="MA">Massachusetts</option>

                            <option value="MI">Michigan</option>

                            <option value="MN">Minnesota</option>

                            <option value="MS">Mississippi</option>

                            <option value="MO">Missouri</option>

                            <option value="MT">Montana</option>

                            <option value="NE">Nebraska</option>

                            <option value="NV">Nevada</option>

                            <option value="NH">New Hampshire</option>

                            <option value="NJ">New Jersey</option>

                            <option value="NM">New Mexico</option>

                            <option value="NY">New York</option>

                            <option value="NF">Newfoundland</option>

                            <option value="NC">North Carolina</option>

                            <option value="ND">North Dakota</option>

                            <option value="OH">Ohio</option>

                            <option value="OK">Oklahoma</option>

                            <option value="OR">Oregon</option>

                            <option value="PA">Pennsylvania</option>

                            <option value="RI">Rhode Island</option>

                            <option value="SC">South Carolina</option>

                            <option value="SD">South Dakota</option>

                            <option value="TN">Tennessee</option>

                            <option value="TX">Texas</option>

                            <option value="UT">Utah</option>

                            <option value="VT">Vermont</option>

                            <option value="VA">Virginia</option>

                            <option value="WA">Washington</option>

                            <option value="DC">Washington, D.C.</option>

                            <option value="WV">West Virginia</option>

                            <option value="WI">Wisconsin</option>

                            <option value="WY">Wyoming</option>

                          </select>

                        </font></td>

                      </tr>

                      <!--  <tr bgcolor="#FFFFFF"> 

                  <td width="40%" align="right" >Country</td>

                  <td width="60%"> &nbsp; <select name="optcountry" class="combobox1">

                      <option value="">--Select Any One--</option>

                      <option value="AF">Afghanistan</option>

                      <option value="AL">Albania</option>

                      <option value="DZ">Algeria</option>

                      <option value="AS">American Samoa</option>

                      <option value="AD">Andorra</option>

                      <option value="AO">Angola</option>

                      <option value="AI">Anguilla</option>

                      <option value="AQ">Antarctica</option>

                      <option value="AG">Antigua and Barbuda</option>

                      <option value="AR">Argentina</option>

                      <option value="AM">Armenia</option>

                      <option value="AW">Aruba</option>

                      <option value="AU">Australia</option>

                      <option value="AT">Austria</option>

                      <option value="AZ">Azerbaijan</option>

                      <option value="BS">Bahamas</option>

                      <option value="BH">Bahrain</option>

                      <option value="BD">Bangladesh</option>

                      <option value="BB">Barbados</option>

                      <option value="BY">Belarus</option>

                      <option value="BE">Belgium</option>

                      <option value="BZ">Belize</option>

                      <option value="BJ">Benin</option>

                      <option value="BM">Bermuda</option>

                      <option value="BT">Bhutan</option>

                      <option value="BO">Bolivia</option>

                      <option value="BA">Bosnia Hercegovina</option>

                      <option value="BW">Botswana</option>

                      <option value="BV">Bouvet Island</option>

                      <option value="BR">Brazil</option>

                      <option value="IO">British Indian Ocean Territory</option>

                      <option value="BN">Brunei Darussalam</option>

                      <option value="BG">Bulgaria</option>

                      <option value="BF">Burkina Faso</option>

                      <option value="BI">Burundi</option>

                      <option value="KH">Cambodia</option>

                      <option value="CM">Cameroon</option>

                      <option value="CA">Canada</option>

                      <option value="CV">Cape Verde</option>

                      <option value="KY">Cayman Islands</option>

                      <option value="CF">Central African Republic</option>

                      <option value="TD">Chad</option>

                      <option value="CL">Chile</option>

                      <option value="CN">China</option>

                      <option value="CX">Christmas Island</option>

                      <option value="CC">Cocos (Keeling) Islands</option>

                      <option value="CO">Colombia</option>

                      <option value="KM">Comoros</option>

                      <option value="CG">Congo</option>

                      <option value="CK">Cook Islands</option>

                      <option value="CR">Costa Rica</option>

                      <option value="CI">Cote D'ivoire</option>

                      <option value="HR">Croatia</option>

                      <option value="CU">Cuba</option>

                      <option value="CY">Cyprus</option>

                      <option value="CZ">Czech Republic</option>

                      <option value="DK">Denmark</option>

                      <option value="DJ">Djibouti</option>

                      <option value="DM">Dominica</option>

                      <option value="DO">Dominican Republic</option>

                      <option value="TP">East Timor</option>

                      <option value="EC">Ecuador</option>

                      <option value="EG">Egypt</option>

                      <option value="SV">EL Salvador</option>

                      <option value="GQ">Equatorial Guinea</option>

                      <option value="ER">Eritrea</option>

                      <option value="EE">Estonia</option>

                      <option value="ET">Ethiopia</option>

                      <option value="FK">Falkland Islands (Malvinas)</option>

                      <option value="FO">Faroe Islands</option>

                      <option value="FJ">Fiji</option>

                      <option value="FI">Finland</option>

                      <option value="FR">France</option>

                      <option value="GF">French Guiana</option>

                      <option value="PF">French Polynesia</option>

                      <option value="TF">French Southern Territories</option>

                      <option value="GA">Gabon</option>

                      <option value="GM">Gambia</option>

                      <option value="GE">Georgia</option>

                      <option value="DE">Germany</option>

                      <option value="GH">Ghana</option>

                      <option value="GI">Gibraltar</option>

                      <option value="GR">Greece</option>

                      <option value="GL">Greenland</option>

                      <option value="GD">Grenada</option>

                      <option value="GP">Guadeloupe</option>

                      <option value="GU">Guam</option>

                      <option value="GT">Guatemala</option>

                      <option value="GN">Guinea</option>

                      <option value="GW">Guinea-Bissau</option>

                      <option value="GY">Guyana</option>

                      <option value="HT">Haiti</option>

                      <option value="HM">Heard and Mc Donald Islands</option>

                      <option value="HN">Honduras</option>

                      <option value="HK">Hong Kong</option>

                      <option value="HU">Hungary</option>

                      <option value="IS">Iceland</option>

                      <option value="IN">India</option>

                      <option value="ID">Indonesia</option>

                      <option value="IR">Iran</option>

                      <option value="IQ">Iraq</option>

                      <option value="IE">Ireland</option>

                      <option value="IL">Israel</option>

                      <option value="IT">Italy</option>

                      <option value="JM">Jamaica</option>

                      <option value="JP">Japan</option>

                      <option value="JO">Jordan</option>

                      <option value="KZ">Kazakhstan</option>

                      <option value="KE">Kenya</option>

                      <option value="KI">Kiribati</option>

                      <option value="KP">Korea (North)</option>

                      <option value="KR">Korea (South)</option>

                      <option value="KW">Kuwait</option>

                      <option value="KG">Kyrgyzstan</option>

                      <option value="LA">Laos</option>

                      <option value="LV">Latvia</option>

                      <option value="LB">Lebanon</option>

                      <option value="LS">Lesotho</option>

                      <option value="LR">Liberia</option>

                      <option value="LY">Libyan Arab Jamahiriya</option>

                      <option value="LI">Liechtenstein</option>

                      <option value="LT">Lithuania</option>

                      <option value="LU">Luxembourg</option>

                      <option value="MO">Macau</option>

                      <option value="MK">Macedonia</option>

                      <option value="MG">Madagascar</option>

                      <option value="MW">Malawi</option>

                      <option value="MY">Malaysia</option>

                      <option value="MV">Maldives</option>

                      <option value="ML">Mali</option>

                      <option value="MT">Malta</option>

                      <option value="MH">Marshall Islands</option>

                      <option value="MQ">Martinique</option>

                      <option value="MR">Mauritania</option>

                      <option value="MU">Mauritius</option>

                      <option value="YT">Mayotte</option>

                      <option value="MX">Mexico</option>

                      <option value="FM">Micronesia</option>

                      <option value="MC">Monaco</option>

                      <option value="MN">Mongolia</option>

                      <option value="MS">Montserrat</option>

                      <option value="MA">Morocco</option>

                      <option value="MZ">Mozambique</option>

                      <option value="MM">Myanmar</option>

                      <option value="NA">Nambia</option>

                      <option value="NR">Nauru</option>

                      <option value="NP">Nepal</option>

                      <option value="NL">Netherlands</option>

                      <option value="AN">Netherlands Antilles</option>

                      <option value="NC">New Caledonia</option>

                      <option value="NZ">New Zealand</option>

                      <option value="NI">Nicaragua</option>

                      <option value="NE">Niger</option>

                      <option value="NG">Nigeria</option>

                      <option value="NU">Niue</option>

                      <option value="NF">Norfolk Island</option>

                      <option value="MP">Northern Mariana Islands</option>

                      <option value="NO">Norway</option>

                      <option value="OM">Oman</option>

                      <option value="OT">Others</option>

                      <option value="PK">Pakistan</option>

                      <option value="PW">Palau</option>

                      <option value="PS">Palestinian Territory, Occupied</option>

                      <option value="PA">Panama</option>

                      <option value="PG">Papua New Guinea</option>

                      <option value="PY">Paraguay</option>

                      <option value="PE">Peru</option>

                      <option value="PH">Philippines</option>

                      <option value="PN">Pitcairn</option>

                      <option value="PL">Poland</option>

                      <option value="PT">Portugal</option>

                      <option value="PR">Puerto Rico</option>

                      <option value="QA">Qatar</option>

                      <option value="MD">Republic Of Moldova</option>

                      <option value="RE">Reunion</option>

                      <option value="RO">Romania</option>

                      <option value="RU">Russia</option>

                      <option value="RW">Rwanda</option>

                      <option value="KN">Saint Kitts And Nevis</option>

                      <option value="LC">Saint Lucia</option>

                      <option value="VC">Saint Vincent and The Grenadines</option>

                      <option value="WS">Samoa</option>

                      <option value="SM">San Marino</option>

                      <option value="ST">Sao Tome and Principe</option>

                      <option value="SA">Saudi Arabia</option>

                      <option value="SN">Senegal</option>

                      <option value="SC">Seychelles</option>

                      <option value="SL">Sierra Leone</option>

                      <option value="SG">Singapore</option>

                      <option value="SK">Slovakia</option>

                      <option value="SI">Slovenia</option>

                      <option value="SB">Solomon Islands</option>

                      <option value="SO">Somalia</option>

                      <option value="ZA">South Africa</option>

                      <option value="GS">South Georgia And South Sandwich Islands</option>

                      <option value="ES">Spain</option>

                      <option value="LK">Sri Lanka</option>

                      <option value="SH">St. Helena</option>

                      <option value="PM">St. Pierre and Miquelon</option>

                      <option value="SD">Sudan</option>

                      <option value="SR">Suriname</option>

                      <option value="SJ">Svalbard and Jan Mayen Islands</option>

                      <option value="SZ">Swaziland</option>

                      <option value="SE">Sweden</option>

                      <option value="CH">Switzerland</option>

                      <option value="SY">Syrian Arab Republic</option>

                      <option value="TW">Taiwan</option>

                      <option value="TJ">Tajikistan</option>

                      <option value="TZ">Tanzania</option>

                      <option value="TH">Thailand</option>

                      <option value="TG">TOGO</option>

                      <option value="TK">Tokelau</option>

                      <option value="TO">Tonga</option>

                      <option value="TT">Trinidad and Tobago</option>

                      <option value="TN">Tunisia</option>

                      <option value="TR">Turkey</option>

                      <option value="TM">Turkmenistan</option>

                      <option value="TC">Turks and Caicos Islands</option>

                      <option value="TV">Tuvalu</option>

                      <option value="UG">Uganda</option>

                      <option value="UA">Ukraine</option>

                      <option value="AE">United Arab Emirates</option>

                      <option value="GB">United Kingdom</option>

                      <option value="US" selected>United States</option>

                      <option value="UM">United States Minor Outlying Islands</option>

                      <option value="UY">Uruguay</option>

                      <option value="UZ">Uzbekistan</option>

                      <option value="VU">Vanuatu</option>

                      <option value="VA">Vatican City State (Holy See)</option>

                      <option value="VE">Venezuela</option>

                      <option value="VN">Viet Nam</option>

                      <option value="VG">Virgin Islands (British)</option>

                      <option value="VI">Virgin Islands (U.S.)</option>

                      <option value="WF">Wallis and Futuna Islands</option>

                      <option value="EH">Western Sahara</option>

                      <option value="YE">Yemen</option>

                      <option value="YU">Yugoslavia</option>

                      <option value="CD" >Zaire</option>

                      <option value="ZM">Zambia</option>

                      <option value="ZW">Zimbabwe</option>

                    </select> </td>

                </tr> -->

                      <tr> 

                        <td width="40%" align="right" >

						<font face="Tahoma" size="2">Zip Code</font></td>

                        <td width="60%"><font face="Tahoma"><font size="2">&nbsp; 

                          

                          </font> 

                          

                          <input name="txtpcode" type="text" class="txtbox1" id="txtpcode" onBlur="MM_validateForm('txtpcode','','NisNum');return document.MM_returnValue" maxlength="5">

                          <font size="2">

						</font></font>

						

                        </td>

                      </tr>

                      <tr> 

                        <td width="40%" align="right" >

						<font face="Tahoma" size="2">Contact 

                          Number</font></td>

                        <td width="60%"><font face="Tahoma"><font size="2">&nbsp; 

                        

                          </font> 

                        

                          <input name="txtcontactno" type="text" class="txtbox1" id="txtcontactno" onBlur="YY_checkform('regfrm');return document.MM_returnValue" maxlength="15">

                        </font></td>

                      </tr>

                      <tr> 

                        <td width="40%" align="right" >

						<font face="Tahoma" size="2">Email Address</font></td>

                        <td width="60%"><font face="Tahoma"><font size="2">&nbsp; 

                         

                          </font> 

                         

                          <input name="txtemailid" type="text" class="combobox1" id="txtemailid" onBlur="MM_validateForm('txtemailid','','NisEmail');return document.MM_returnValue">

                          <font size="2">

						</font></font>

                        </td>

                      </tr>

                      <tr> 

                        <td height="25" align="right">

						<font face="Tahoma" size="2">Course</font></td>

                        <td height="25"><font face="Tahoma"><font size="2">&nbsp; 

                         

                          </font> 

                         

                                                 

                         <!-- retrieve courses list from playerscores.mdb - courses table-->

                         

                         

                          <select name=txtcourseid class="combobox1">

                            <option value="">--Choose The Course--</option>

                            <%

							  set Rs_Course = conSQL.execute("select * from courses")

							  while Not Rs_Course.Eof 

							  response.Write("<option value="&Rs_Course("CourseID")&">"&Rs_Course("Name")&"		                              </option>")							  	

							  Rs_Course.MoveNext

							  wend 

							  %>

                        </select></font></td>

                      </tr>

                      <tr>

                        <td height="25" align="right">

						<p align="left"><font face="Tahoma" size="2">Golf Course 

						Membership ID</font></td>

                        <td height="25"><font face="Tahoma"><font size="2">&nbsp;

                          </font>

                          <input name="txtmemberid" type="text" id="txtmemberid" maxlength="14">

                        </font></td>

                      </tr>

                      <tr> 

                        <td colspan="2" class="tableheader">

						<font face="Tahoma" size="2">Login 

                          Information</font></td>

                      </tr>

                      <tr> 

                        <td width="40%" align="right" >

						<font face="Tahoma" size="2">Username</font></td>

                        <td width="60%"><font face="Tahoma"><font size="2">&nbsp; 

                         

                          </font> 

                         

                          <input type="text" name="txtuname" class="txtbox1"><font size="2">

						</font></font>

                        </td>

                      </tr>

                      <tr> 

                        <td width="40%" align="right" >

						<font face="Tahoma" size="2">Password</font></td>

                        <td width="60%"><font face="Tahoma"><font size="2">&nbsp; 

                           </font> 

                           <input type="password" name="txtpwd" class="txtbox1"></font></td>

                      </tr>

                      <tr> 

                        <td width="40%" align="right" >

						<font face="Tahoma" size="2">Confirm Password</font></td>

                        <td width="60%"><font face="Tahoma"><font size="2">&nbsp; 

  						</font> 

  <input type="password" name="txtcpwd" class="txtbox1"><font size="2"> </font>

						</font>

                        </td></tr>

                      <tr align="center" > 

                        <td colspan="2" > 

                        <div align = "center" > <p align="center">

                  
 

                          

                          

                          <!-- include the Web Wiz CAPTCHA form -->

<!--#include file="CAPTCHA/CAPTCHA_form_inc.asp" --> 

 </p>

                         

                          

                          

                            <font face="Tahoma">  

                              

                <input type="submit" name="Submit" value="Submit" class="button1" onClick="return validate_all()">

                            <input type="reset" name="Submit2" value="Reset" class="button1">

                               <font size="2">

                               </font></font> </div></td>

                      </tr>

                    </table>

                  </td>

                </tr>

              </table>

            </td>

          </tr>

        </table>

        <font face="Tahoma" size="2">

        <br>

        <br>

      	</font>

    </form>    </td>

    <td width="1" valign="top" bgcolor="#285E8E"></td>

    <td width="161" valign="top" bgcolor="#FFFFFF">&nbsp;</td>

  </tr>

  <tr> 

    <td colspan="4">

      <font face="Tahoma" size="2">

      <!--#include file="../include/footer.asp"-->

    	</font>

    </td>

  </tr>

</table>

</body>

</html>
 
 
 
 
 
 
 

succeedpayment.asp ( send email)
 

<% response.buffer=true

 level="../"%>

 

<!--include file="../include/connection.asp"-->

<!--#include file="../../Connections/sqlConn1.asp" -->

<!--#include file="../../Connections/sqlConn3.asp" -->

<!--#include file="rc4.inc"-->

 

<!-- Include file for CAPTCHA configuration -->

<!-- #include file="CAPTCHA/CAPTCHA_configuration.asp" -->

 

<!-- Include file for CAPTCHA form processing --> 

<!-- #include file="CAPTCHA/CAPTCHA_process_form.asp" -->

 

<%

		' Generating Random Number to use as e-mail refer

		set RecsetRef= conSQL.execute("select max(referenceno) from Players")

		

		If isnull(RecsetRef(0)) Then 

			ReferenceNumber=1001

		else

			S_ReferenceNumber =  RecsetRef(0)

			ReferenceNumber=S_ReferenceNumber+1

		End If

		RecsetRef.close

		Set RecsetRef = Nothing 

		Response.Write(ReferenceNumber)

 

'		psw="playerscores"	

'		stime = timer

'		strTemp = EnDeCrypt(ReferenceNumber, psw)

	

' If "" & Request("txtemailid") <> "" Then 

    If blnCAPTCHAcodeCorrect <> True then

	'Session("email") = Request("txtemailid")

      ' Session("name") = Request("txtfname")

        'Session("Message") = Request("Message")

 

       'Place code here that is to run if CAPTCHA is NOT entered correctly 

       Response.Write("CAPTCHA code is NOT correct")

	   Response.Redirect "index.asp?err=captcha"

 end if 

	

	

	' Retrieving from the Sigup form

		txtfname=session("S_txtfname")

		txtlname=session("S_txtlname")

		txtaddr1=session("S_txtaddr1")

		txtaddr2=session("S_txtaddr2")

		txtcity=session("S_txtcity")

		txtstate=session("S_txtstate")

		optcountry=session("S_optcountry")

		txtpcode=session("S_txtpcode")

		txtcourseid=session("S_txtcourseid")

		txtmemberid=session("S_txtmemberid")

		txtcontactno=session("S_txtcontactno")

		txtemailid=session("S_txtemailid")

		txtuname=session("S_txtuname")

		txtpwd=session("S_txtpwd")

		regdate=date()

		regtime=time()

		

 

conSQL.execute("Insert into Players (SSN,[password],firstname,lastname,addy1,addy2,city,state,Zip,phone,email,regdate,regtime,referenceno,courseid,memberid) values ('"&txtuname&"','"&txtpwd&"','"&txtfname&"','"&txtlname&"','"&txtaddr1&"','"&txtaddr2&"','"&txtcity&"','"&txtstate&"','"&txtpcode&"','"&txtcontactno&"','"&txtemailid&"','"&regdate&"','"&regtime&"','"&ReferenceNumber&"','"&txtcourseid&"','"&txtmemberid&"')")

 

		If Err.Number <> 0 Then

		Response.Write "Error: " & Err.Description

			    response.end

			Response.Write "Unable to Store your Information "

			response.end

		else

		    session("username")=txtuname

			

'Send Mail with CDOSYS

 

 

sql="<html><body><b>Dear Member,</b><br><br>  Your account information has Been verified by playerscores.com staff.<br>Your account has been activated. <br><br>Your Username - "&txtuname&"<br>Your Password - "&txtpwd&" <br><br> Important information - Please write down this reference # to edit your <br> account with www.playerscores.com/ <br>  Your Reference Number is :"&ReferenceNumber&" <br> <br>  To Confirm your membership click on the link below,<br><a href='http://www.playerscores.com/members/verify.asp?refno="&ReferenceNumber&"'>http://www.playerscores.com/members/verify.asp?refno="&ReferenceNumber&"</a><br><br> <BR>  Please don't hesitate to email us if any questions should arise. <br><BR>  Thanks,<BR>  Playerscores staff<BR>  info@playerscores.com</body></html>"

 

	

Set myMail=CreateObject("CDO.Message")

myMail.Subject="Thanks For your Registration with Playerscores.com "

myMail.From="info@playerscores.com"

myMail.To= txtemailid

myMail.HTMLBody= sql

myMail.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/sendusing")=2

'Name or IP of remote SMTP server

myMail.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/smtpserver") _

="192.168.5.235"

'Server port

myMail.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/smtpserverport") _

=25 

myMail.Configuration.Fields.Update

myMail.Send

If Err.Number <> 0 Then

				Response.Write "Error: " & Err.Description

			    response.end

			    end if

				

				' clean up 

				set myMail=nothing

				

				'		psw="playerscores"	

'		stime = timer

'		strTemp = EnDeCrypt(ReferenceNumber, psw)

 

	' Insert newly registered member into Mailing list		

		Randomize Timer

		'Calculate a code for the user

		strUserCode = Left(txtemailid,2) & (9876989856 * CInt((RND * 32000) + 100))

 

		con3SQL.Execute("insert into tblMailingList (Email,ID_Code) values('"&txtemailid&"','"&	        strUserCode&"')")		

		'con7.execute("update tblauthor set Active = 1 where username='"&request("SSN")&"'")

		

	response.redirect "../Forum/register.asp?mode=new"	

	

		response.redirect "thank.asp"

    

 

    End if

	

%>

Open in new window

0
Comment
Question by:RickyGtz
  • 3
  • 2
5 Comments
 
LVL 4

Accepted Solution

by:
joachimcarrein earned 250 total points
Comment Utility
Hello RickyGtz,

Are you sure the session_destroy is not accidently called from within one of the other includes?
maybe you should comment everything in de session_destroy page, to make sure this is not what is bugging you.

Regards,

joachimcarrein
0
 

Author Comment

by:RickyGtz
Comment Utility
It may be the problem.....

sessiondestroy.asp

So if this is the problem , reomving that include would send the session variables right to the succeedpayment???
<% 

	session("username")=""

	

	session("S_txtfname")=""

	session("S_txtlname")=""

	session("S_txtaddr1")=""

	session("S_txtaddr2")=""

	session("S_txtcity")=""

	session("S_txtstate")=""
 

	session("S_txtpcode")=""

	session("S_txtcontactno")=""

	session("S_txtemailid")=""

	session("S_txtuname")=""

	session("S_txtpwd")=""

      session.abandon
 

%>

Open in new window

0
 
LVL 4

Expert Comment

by:joachimcarrein
Comment Utility
RickyGtz,

Maybe you can try commenting out the file itself to see if the problem lies here or not.

joachimcarrein
0
 

Author Comment

by:RickyGtz
Comment Utility
will it matter if it is only included on the form and not on the processing form page
0
 
LVL 4

Expert Comment

by:joachimcarrein
Comment Utility
RickyGtz,

yes it will

joachimcarrein
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now