[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

07/07/2008 at 01:10PM PDT, ID: 23544602
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.3

Credit Application FORM CAPTCHA not validating and not processing to next php page.

Asked by Guest85 in PHP and Databases

Tags: PHP, FF 2.0-3.0, IE 5-7

I have a credit application and here's the final processes of the form:

Step 3.0 - Final form fields w/ Captcha image and submit button at the bottom >>
Step 3.1 - Captcha Validation page that forwards to a different page when validated >>
Step 4.0 - Processor page (Steps 1-3 saved in session and submitted to DB at this point) >>
Step 4.1 - Credit Application submission confirmation page.

Here's the problem:

I see the Captcha image on step 3.0 but going to Step 3.1(Captcha Validation) freezes the process with a white page whether I type the Captcha correctly or not. I don't have an error message for when the Captcha is incorrect.

I've been able to change Step 3.1(Captcha Validation)  to forward to the other pages and submit to the DB but then the Captcha isn't validated at all.

Can you look at the code I'm using for Step 3.1 (Captcha Validation) and tell me what needs to be changed? I'll provide Step 3.0 and then 3.1.

Thanks!
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
<?php
session_start();
$SID=session_id();
 
//Connection statement
require_once('../Connections/devnet.php');
 
// Load the common classes
require_once('../includes/common/KT_common.php');
 
// Load the tNG classes
require_once('../includes/tng/tNG.inc.php');
 
// Make a transaction dispatcher instance
$tNGs = new tNG_dispatcher("../");
 
// Start trigger
$formValidation = new tNG_FormValidation();
$formValidation->addField("cc_type", ture, "text", "", "2", "", "Please select a Credit Card type.");
$formValidation->addField("cc_number", true, "text", "cc_generic", "", "", "");
$formValidation->addField("cc_expire", true, "text", "", "3", "", "Pleast enter at least 3 digits.");
$formValidation->addField("cc_holdername", true, "text", "", "", "", "");
$formValidation->addField("cc_signature", true, "text", "", "3", "", "Please enter at least 3 digits.");
$formValidation->addField("agree", true, "", "", "", "", "");
$tNGs->prepareValidation($formValidation);
// End trigger
 
// Make a custom transaction instance
$customTransaction = new tNG_insert($devnet);
$tNGs->addTransaction($customTransaction);
 
// Register triggers
$customTransaction->registerTrigger("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Custom1");
$customTransaction->registerTrigger("BEFORE", "Trigger_Default_FormValidation", 10, $formValidation);
$customTransaction->registerTrigger("END", "Trigger_Default_Redirect", 99, ".../index.php?app=ccp0&ns=display&ref=Captcha_Validation");
// index.php?action=insert
 
// Add columns
$customTransaction->setTable("credit_app3");
$customTransaction->addColumn("checking", "CHECKBOX_YN_TYPE", "POST", "checking", "N");
$customTransaction->addColumn("checking_bank_name", "STRING_TYPE", "POST", "checking_bank_name");
$customTransaction->addColumn("checking_bank_location", "STRING_TYPE", "POST", "checking_bank_location");
$customTransaction->addColumn("checking_account_number", "STRING_TYPE", "POST", "checking_account_number");
$customTransaction->addColumn("savings", "CHECKBOX_YN_TYPE", "POST", "savings", "N");
$customTransaction->addColumn("savings_bank_name", "STRING_TYPE", "POST", "savings_bank_name");
$customTransaction->addColumn("savings_bank_location", "STRING_TYPE", "POST", "savings_bank_location");
$customTransaction->addColumn("savings_account_number", "STRING_TYPE", "POST", "savings_account_number");
$customTransaction->addColumn("cc_type", "STRING_TYPE", "POST", "cc_type");
$customTransaction->addColumn("cc_number", "STRING_TYPE", "POST", "cc_number");
$customTransaction->addColumn("cc_expire", "STRING_TYPE", "POST", "cc_expire");
$customTransaction->addColumn("cc_holdername", "STRING_TYPE", "POST", "cc_holdername");
$customTransaction->addColumn("cc_signature", "STRING_TYPE", "POST", "cc_signature");
$customTransaction->addColumn("agree", "CHECKBOX_YN_TYPE", "POST", "agree", "N");
$customTransaction->addColumn("agree_date", "STRING_TYPE", "POST", "agree_date");
$customTransaction->setPrimaryKey("ID", "NUMERIC_TYPE");
// End of custom transaction instance
 
// Execute all the registered transactions
$tNGs->executeTransactions();
 
// Get the transaction recordset
$rscustom = $tNGs->getRecordset("customTransaction");
$totalRows_rscustom = $rscustom->RecordCount();
 
$action=$_GET['action'];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 
<head>
<title>Credit Application - Step 3</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 
<?php echo $tNGs->displayValidationRules();?>
 
<style type="text/css">
<!--
.style1 {color: #C31F1F}
.style2 {color: #0000CC; }
-->
</style>
</head>
 
<body>
 
<form method="post" id="form1" action=".../index.php?app=ccp0&ns=display&ref=credit_application_3.1">
  <table align="center" cellpadding="2" cellspacing="0" class="KT_tngtable">
	<tr>
      <td class="KT_th"><label for="checking">Checking:</label></td>
      <td><input  <?php if (!(strcmp(KT_escapeAttribute($rscustom->Fields('checking')),"Y"))) {echo "checked";} ?> type="checkbox" name="checking" id="checking" value="Y" />
          <?php echo $tNGs->displayFieldError("custom", "Checking"); ?> </td>
    </tr>
    <tr>
      <td class="KT_th"><label for="checking_bank_name">Checking Bank Name:</label></td>
      <td><input type="text" name="checking_bank_name" id="checking_bank_name" value="<?php echo KT_escapeAttribute($rscustom->Fields('checking_bank_name')); ?>" size="32" />
          <?php echo $tNGs->displayFieldHint("checking_bank_name");?> <?php echo $tNGs->displayFieldError("custom", "checking_bank_name"); ?> </td>
    </tr>
    <tr>
      <td class="KT_th"><label for="checking_bank_location">Checking Bank Location:</label></td>
      <td><input type="text" name="checking_bank_location" id="checking_bank_location" value="<?php echo KT_escapeAttribute($rscustom->Fields('checking_bank_location')); ?>" size="32" />
          <?php echo $tNGs->displayFieldHint("checking_bank_location");?> <?php echo $tNGs->displayFieldError("custom", "checking_bank_location"); ?> </td>
    </tr>
    <tr>
      <td class="KT_th"><label for="checking_account_number">Checking Account Number:</label></td>
      <td><input type="text" name="checking_account_number" id="checking_account_number" value="<?php echo KT_escapeAttribute($rscustom->Fields('checking_account_number')); ?>" size="32" />
          <?php echo $tNGs->displayFieldHint("checking_account_number");?> <?php echo $tNGs->displayFieldError("custom", "checking_account_number"); ?> </td>
    </tr>
    <tr>
	  <td class="KT_th"><label for="savings">Savings:</label></td>
      <td><input  <?php if (!(strcmp(KT_escapeAttribute($rscustom->Fields('savings')),"Y"))) {echo "checked";} ?> type="checkbox" name="savings" id="savings" value="Y" />
          <?php echo $tNGs->displayFieldError("custom", "Savings"); ?> </td>
    </tr>
    <tr>
      <td class="KT_th"><label for="savings_bank_name">Savings Bank Name:</label></td>
      <td><input type="text" name="savings_bank_name" id="savings_bank_name" value="<?php echo KT_escapeAttribute($rscustom->Fields('savings_bank_name')); ?>" size="32" />
          <?php echo $tNGs->displayFieldHint("savings_bank_name");?> <?php echo $tNGs->displayFieldError("custom", "savings_bank_name"); ?> </td>
    </tr>
    <tr>
      <td class="KT_th"><label for="savings_bank_location">Savings Bank Location:</label></td>
      <td><input type="text" name="savings_bank_location" id="savings_bank_location" value="<?php echo KT_escapeAttribute($rscustom->Fields('savings_bank_location')); ?>" size="32" />
          <?php echo $tNGs->displayFieldHint("savings_bank_location");?> <?php echo $tNGs->displayFieldError("custom", "savings_bank_location"); ?> </td>
    </tr>
    <tr>
      <td class="KT_th"><label for="savings_account_number">Savings Account Number:</label></td>
      <td><input type="text" name="savings_account_number" id="savings_account_number" value="<?php echo KT_escapeAttribute($rscustom->Fields('savings_account_number')); ?>" size="32" />
          <?php echo $tNGs->displayFieldHint("savings_account_number");?> <?php echo $tNGs->displayFieldError("custom", "savings_account_number"); ?> </td>
    </tr>
    <tr>
      <td class="KT_th"><label for="cc_type">Credit Card Type:</label></td>
      <td><select name="cc_type" id="cc_type">
	    <option value="-" >Select One</option>
        <option value="VISA" >VISA</option>
        <option value="MASTERCARD" >MASTERCARD</option>
        <option value="DISCOVER" >DISCOVER</option>
        <option value="AMERICAN EXPRESS" >AMERICAN EXPRESS</option>
      </select>
          <?php echo $tNGs->displayFieldError("custom", "cc_type"); ?> </td>
    </tr>
    <tr>
      <td class="KT_th"><label for="cc_number">Credit Card Number:</label></td>
      <td><input type="text" name="cc_number" id="cc_number" value="<?php echo KT_escapeAttribute($rscustom->Fields('cc_number')); ?>" size="32" />
          <?php echo $tNGs->displayFieldHint("cc_number");?> <?php echo $tNGs->displayFieldError("custom", "cc_number"); ?> </td>
    </tr>
    <tr>
      <td class="KT_th"><label for="cc_expire">Exp. Date:</label></td>
      <td><input type="text" name="cc_expire" id="cc_expire" value="<?php echo KT_escapeAttribute($rscustom->Fields('cc_expire')); ?>" size="32" />
          <?php echo $tNGs->displayFieldHint("cc_expire");?> <?php echo $tNGs->displayFieldError("custom", "cc_expire"); ?> </td>
    </tr>
    <tr>
      <td class="KT_th"><label for="cc_holdername">Cardholders Name:</label></td>
      <td><input type="text" name="cc_holdername" id="cc_holdername" value="<?php echo KT_escapeAttribute($rscustom->Fields('cc_holdername')); ?>" size="32" />
          <?php echo $tNGs->displayFieldHint("cc_holdername");?> <?php echo $tNGs->displayFieldError("custom", "cc_holdername"); ?> </td>
    </tr>
    <tr>
      <td class="KT_th"><label for="cc_signature"><a href=".../credit/validation.php" class="style2" onClick="return popup2(this, 'validation')">Security Validation #:</a></label></td>
      <td><input type="text" name="cc_signature" id="cc_signature" value="<?php echo KT_escapeAttribute($rscustom->Fields('cc_signature')); ?>" size="32" />
          <?php echo $tNGs->displayFieldHint("cc_signature");?> <?php echo $tNGs->displayFieldError("custom", "cc_signature"); ?> </td>
    </tr>
    <tr>
      <td class="KT_th"><label for="agree"><a href=".../credit/terms_and_conditions.php/" class="style2" onClick="return popup(this, 'terms_and_conditions')">Agree to Terms:</a></label></td>
	  <td><input  <?php if (!(strcmp(KT_escapeAttribute($rscustom->Fields('agree')),"Y"))) {echo "checked";} ?> type="checkbox" name="agree" id="agree" value="Y" />
          <?php echo $tNGs->displayFieldError("custom", "agree"); ?> </td>
    </tr>
    <tr>
      <td colspan="2" class="KT_th"><div align="center"><p><img src=".../credit/CaptchaSecurityImages.php" alt="captcha" /><input id="security_code" name="security_code" type="text" /></p></div>
        </td>
    </tr>
    <tr class="KT_buttons">
      <td colspan="2"><div align="right">
        <input type="hidden" name="agree_date" id="agree_date" value="<?php echo date('YmdHis'); ?>" />
		<input type="submit" name="KT_Custom1" id="KT_Custom1" value="Submit Application" />
      </div></td>
    </tr>
  </table>
</form>
 
</body>
</html>
[+][-]07/07/08 01:12 PM, ID: 21948272

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/07/08 03:22 PM, ID: 21949149

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/08/08 08:49 AM, ID: 21955003

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/08/08 09:14 AM, ID: 21955278

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/08/08 09:24 AM, ID: 21955402

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PHP and Databases
Tags: PHP, FF 2.0-3.0, IE 5-7
Sign Up Now!
Solution Provided By: routinet
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07/08/08 11:28 AM, ID: 21956604

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/08/08 12:53 PM, ID: 21957542

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/08/08 04:34 PM, ID: 21959330

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/08/08 05:34 PM, ID: 21959627

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/08/08 05:35 PM, ID: 21959631

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/10/08 11:48 AM, ID: 21976312

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/10/08 03:28 PM, ID: 21977914

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/11/08 03:24 PM, ID: 21986536

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07/11/08 04:21 PM, ID: 21986765

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/14/08 08:56 AM, ID: 21999251

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20090824-EE-VQP-74 / EE_QW_2_20070628