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

Question
[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.2

PHP Form won't submit for processing.   - PHP5, mySql

Asked by MHenry in PHP Scripting Language

Tags: php mysql

Hi,

I built this form (with a lot of help on the select) to render out a form based on a mySql table. It collects the number of registrations a person has paid for then prints out a line for each where they can submit their registration information.

Except it won't submit.

I've gone through the whole form several times and taken out everything I can think of to see where the problem is. It looks like the problem is somewhere in the four case statements. I can take a simple form and drop it on the page and it works fine - even through the select statement. But when I put the case statements in, the submit no longer functions. I can press on the button as much as I want, it just doesn't do anything.

If anyone can spot the problem, I would be most grateful.

Best,
MH


<form action="submitReg.php" method="post" name="badge">
<table border="0" cellspacing="0" cellpadding="2" width="80%" align="top">
            <tr>
                  <td>&nbsp;</td>
                  <td>First Name</td>
                  <td>Last Name</td>
                  <td>Badge Name</td>
                  <td>Membership Type</td>
                  <td>E-mail Address</td>
                   </tr>                  
<?php
mysql_select_db($database_myConn, $myConn);
$datax = array();
$datay = array();
$dataz = array();
$cartNumber = $_SESSION["CartId"];
$query = "SELECT tbl_cart.cart_custcart_ID AS cartNumber, tbl_cart.cart_sku_ID AS orderSKU, tbl_cart.cart_sku_qty AS quantity FROM tbl_cart WHERE tbl_cart.cart_custcart_ID = '$cartNumber'";

  if ($result = mysql_query($query)) {
$x=1;
$j=1;
while($data = mysql_fetch_array($result, MYSQL_NUM)) {
   $var_name='cartNumber'.$x;
   $$var_name = $data[0];
   $var_name='orderSKU'.$x;
   $$var_name = $data[1];
   $var_name='quantity'.$x;
   $$var_name = $data[2];


 
  switch ($data[1])
    {
    case ($data[1]= 60):
         while ($j <= $data[2]) {
                  echo '<tr align="center">
                        <td><input type="hidden" name="customerID_cart" value="'.$cartNumber.'"></td>
                        <td><input type="text" name="badge['.$x.$j.'][firstName]" size="10" id="firstName'.$x.$j.'"></td>
                        <td><input type="text" name="badge['.$x.$j.'][lastName]" size="10" id="lastName'.$x.$j.'">
                        </td>
                        <td><input type="text" name="badge['.$x.$j.']badgeName]" size="10" id="badgeName'.$x.$j.'">
                        </td>
                        <td><label>
                         <input name="badge" type="text" id="membType'.$x.$j.'" value="3-day Adult Pass">
                      </label></td>
                        <td><input type="text" name="badge['.$x.$j.'][emailAddr]" size="14" id="emailAddr'.$x.$j.'"></td>
                         </tr>';
             $j++;
             }
             $j=1;
             break;
    case ($data[1]= 61):
         while ($j <= $data[2]) {
                  echo '<tr align="center">
                  <td><input type="hidden" name="customerID_cart" value="'.$cartNumber.'"></td>
                        <td><input type="text" name="badge['.$x.$j.'][firstName]" size="10" id="firstName'.$x.$j.'"></td>
                        <td><input type="text" name="badge['.$x.$j.'][lastName]" size="10" id="lastName'.$x.$j.'">
                        </td>
                        <td><input type="text" name="badge['.$x.$j.']badgeName]" size="10" id="badgeName'.$x.$j.'">
                        </td>
                        <td><label>
                         <input name="badge" type="text" id="membType'.$x.$j.'" value="3-day Student Pass">
                      </label></td>
                        <td><input type="text" name="badge['.$x.$j.'][emailAddr]" size="14" id="emailAddr'.$x.$j.'"></td>
                         </tr>';
             $j++;
             }
             $j=1;
         break;                                    
    case ($data[1]= 62):
         while ($j <= $data[2]) {
                  echo '<tr align="center">
                        <td><input type="hidden" name="customerID_cart" value="'.$cartNumber.'"></td>
                        <td><input type="text" name="badge['.$x.$j.'][firstName]" size="10" id="firstName'.$x.$j.'"></td>
                        <td><input type="text" name="badge['.$x.$j.'][lastName]" size="10" id="lastName'.$x.$j.'">
                        </td>
                        <td><input type="text" name="badge['.$x.$j.']badgeName]" size="10" id="badgeName'.$x.$j.'">
                        </td>
                        <td><label>
                         <input name="badge" type="text" id="membType'.$x.$j.'" value="3-day Child Pass">
                      </label></td>
                        <td><input type="text" name="badge['.$x.$j.'][emailAddr]" size="14" id="emailAddr'.$x.$j.'"></td>
                         </tr>';
             $j++;
             }
             $j=1;
         break;
    case ($data[1]= 63):
         while ($j <= $data[2]) {
                  echo '<tr align="center">
                        <td><input type="hidden" name="customerID_cart" value="'.$cartNumber.'"></td>
                        <td><input type="text" name="badge['.$x.$j.'][firstName]" size="10" id="firstName'.$x.$j.'"></td>
                        <td><input type="text" name="badge['.$x.$j.'][lastName]" size="10" id="lastName'.$x.$j.'">
                        </td>
                        <td><input type="text" name="badge['.$x.$j.']badgeName]" size="10" id="badgeName'.$x.$j.'">
                        </td>
                        <td><label>
                         <input name="badge" type="text" id="membType'.$x.$j.'" value="Friday Only Pass">
                      </label></td>
                        <td><input type="text" name="badge['.$x.$j.'][emailAddr]" size="14" id="emailAddr'.$x.$j.'"></td>
                         </tr>';
                  
             $j++;
             }
             $j=1;
         break;
      }
       $x++;       
  }
  }
?>
      
 </table>
                  <input name="submit" type="button" value="submit" />
                  </form>
 
Related Solutions
Keywords: PHP Form won't submit for processin…
 
Loading Advertisement...
 
[+][-]03/11/09 08:03 PM, ID: 23864400Accepted Solution

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 Scripting Language
Tags: php mysql
Sign Up Now!
Solution Provided By: quincydude
Participating Experts: 1
Solution Grade: A
 
[+][-]03/11/09 08:08 PM, ID: 23864425Author Comment

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.

 
[+][-]03/11/09 08:15 PM, ID: 23864450Expert Comment

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.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_EXPERT_20070906