Page 1 of 1

PHP Notice: Undefined index:…

Posted: Sat Dec 18, 2010 10:52 am
by jibarographics
Hello everyone,

I"m a graphic designer learning :crazy: code, and I'm having some issue with the site I'm developing.

I think this is not allowing me to insert the data to the database, any light on this will be greatly appreciated.

I tried to provided you with as much info as possible, anything else please let me know

Thanks!!!!!!!!

Here is the error log:

[text][18-Dec-2010 11:13:48] PHP Notice: Undefined index: RadioGroupCar1 in /Applications/MAMP/htdocs/money4Talk.com/php/incsribase.php on line 84
[18-Dec-2010 11:13:48] PHP Notice: Undefined index: RadioGroupCar2 in /Applications/MAMP/htdocs/money4Talk.com/php/incsribase.php on line 87
[18-Dec-2010 11:13:48] PHP Notice: Undefined index: regulerlyplayRadGroup in /Applications/MAMP/htdocs/money4Talk.com/php/incsribase.php on line 122
[18-Dec-2010 11:13:48] PHP Notice: Undefined index: RadioGroupDoUSmokeCigar in /Applications/MAMP/htdocs/money4Talk.com/php/incsribase.php on line 135
[18-Dec-2010 11:13:48] PHP Notice: Undefined index: RadioGroupDoUSmoke in /Applications/MAMP/htdocs/money4Talk.com/php/incsribase.php on line 137
[18-Dec-2010 11:13:48] PHP Notice: Undefined index: RadioGroupInternet in /Applications/MAMP/htdocs/money4Talk.com/php/incsribase.php on line 157[/text]


Here is my code:

Code: Select all

<?php require_once('../Connections/money4Talk.php'); ?>



<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "spanishForm")) {
  $insertSQL = sprintf("INSERT INTO spanishDBtest (firstName, lastName, dob, age, gender, address, city, states, zipCode, homePhone, workPhone, cell, email, employmentStatus, employer, industry, `position`, sexOrient, maritalStatus, etnicity, education, houseHoldIncome, politicalViews, children, gender1, gender2, gender3, gender4, dob1, dob2, dob3, dob4, visa, masterCard, amEx, discover, dinersClub, gasCard, deptStore, telCard, RadioGroupCar1, brand, modelYear, RadioGroupCar2, brand2, modelYear2, adhd, allergies, arthritis, backPain, breastCancer, colonCancer, prostateCancer, otherCancer, depreAnxi, diabetes1, diabetes2, heartCond, highChol, highBldPres, hivAids, migrane, obesity, otherMedCond, cableTV, digiCableTV, satTV, hdtv, plasmaTV, hTS, lcdTV, gps, mp3Plyr, satRad, digiVidRec, dvdPlyr, digiCam, digiVidCam, regulerlyplayRadGroup, pc, wii, xbox, xbox360, playstation2, playstation3, interactOnline, portblGaming, dog, cat, othrPet, othr, RadioGroupDoUSmokeCigar, howManyHrs, RadioGroupDoUSmoke, cigarretteBrand, cigStrength, cigFlav, howManyPacks, vodka, gin, scotch, tequila, rum, wine, wiskey, champagne, bourbon, beer, wtr, flvBtlWtr, enrgDrnk, coffee, tea, RadioGroupInternet, iceT, milk, ohterDrnk, connectionType, howConnect, desktopPC, desktopMac, labtopPc, labtopMac, tablet, dontHave, palm, visor, sony, compaqHQ, blackberry, ipaq, tMobilePDA, dell, samsung, other, dontHvePda, aol, att, bellsouth, cblvision, comcast, cox, earthL, msn, net0, prodigy, rcn, rr, other2, verizon, juno, mci, notOn) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                     
                       GetSQLValueString(isset($_POST['visa']) ? "true" : "", "defined","'Y'","'N'"),
                       GetSQLValueString(isset($_POST['masterCard']) ? "true" : "", "defined","'Y'","'N'"),
                       GetSQLValueString(isset($_POST['amEx']) ? "true" : "", "defined","'Y'","'N'"),
                       GetSQLValueString(isset($_POST['discover']) ? "true" : "", "defined","'Y'","'N'"),
                       GetSQLValueString(isset($_POST['dinersClub']) ? "true" : "", "defined","'Y'","'N'"),
                       GetSQLValueString(isset($_POST['gasCard']) ? "true" : "", "defined","'Y'","'N'"),
                       GetSQLValueString(isset($_POST['deptStore']) ? "true" : "", "defined","'Y'","'N'"),
                       GetSQLValueString(isset($_POST['telCard']) ? "true" : "", "defined","'Y'","'N'"),

                       [b][color=#FF0000]GetSQLValueString($_POST['RadioGroupCar1'], "text"),[/color][/b]
                       GetSQLValueString($_POST['brand'], "text"),
                       GetSQLValueString($_POST['modelYear'], "date"),
                   [color=#FF0000][b]    GetSQLValueString($_POST['RadioGroupCar2'], "text"),[/b][/color]

                      [b][color=#FF0000] GetSQLValueString($_POST['RadioGroupDoUSmokeCigar'], "text"),[/color][/b]

                       [b][color=#FF0000]GetSQLValueString($_POST['RadioGroupDoUSmoke'], "text"),[/color][/b]

                       [b][color=#FF0000]GetSQLValueString($_POST['RadioGroupInternet'], "text"),[/color][/b]
                     

  mysql_select_db($database_money4Talk, $money4Talk);
  $Result1 = mysql_query($insertSQL, $money4Talk) or die(mysql_error());
}

mysql_select_db($database_money4Talk, $money4Talk);
$query_rsStates = "SELECT * FROM states ORDER BY stateName ASC";
$rsStates = mysql_query($query_rsStates, $money4Talk) or die(mysql_error());
$row_rsStates = mysql_fetch_assoc($rsStates);
$totalRows_rsStates = mysql_num_rows($rsStates);

mysql_select_db($database_money4Talk, $money4Talk);
$query_rsAge = "SELECT * FROM age ORDER BY ageName ASC";
$rsAge = mysql_query($query_rsAge, $money4Talk) or die(mysql_error());
$row_rsAge = mysql_fetch_assoc($rsAge);
$totalRows_rsAge = mysql_num_rows($rsAge);
?>


          <div class="AccordionPanel">
            <div class="AccordionPanelTab">Información de Vehículo</div>
            <fieldset id="vehicleInfo">
              <div class="AccordionPanelContent">
                <div class="col9">
                  <h3>Tiene vehículo?</h3>
                  <p>
                    <label>
                      <input type="radio" name="RadioGroupCar1" value="Yes" id="RadioGroupCar1_0" tabindex="420" />
                      Sí
                      <input type="radio" name="RadioGroupCar1" value="No" id="RadioGroupCar1_1" tabindex="430"/>
                      No</label>
                    <br />
                    <br />
                    <label for="brand">Marca:</label>
                    <select name="brand" id="brand" tabindex="440">
                      
                    </select>
                  </p>
                  <p>
                    <label for="modelYear">Año:</label>
                    <select name="modelYear" id="modelYear" tabindex="450">
                   
                    </select>
                </div>
                <div class="col9">
                  <h3>Tiene un segundo vehículo?</h3>
                  <p>
                    <label>
                      <input type="radio" name="RadioGroupCar2" value="true" id="RadioGroupCar1_2" tabindex="460"/>
                      Sí
                      <input type="radio" name="RadioGroupCar2" value="false" id="RadioGroupCar1_3" tabindex="470"/>
                      No</label>
                    <br />
                    <br />
                    <label for="brand2">Marca:</label>
                    <select name="brand2" id="brand2" tabindex="480">
                     
                    </select>
                  </p>
                  <p>
                    <label for="modelYear2">Año:</label>
                    <select name="modelYear2" id="modelYear2" tabindex="490">
                    
                    </select>
                  </p>
                </div>
                </p>
              </div>
            </fieldset>
          </div>
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">Información de Salud</div>
            <div class="AccordionPanelContent">
              <p>Tiene usted algunas de estas condiciones?(seleccione todas lasque apliquen) </p>
              <fieldset id="healthInfo">
                <div class="col11">
                  <p>
                    <input type="checkbox" name="adhd" id="adhd" tabindex="500" />
                    <label for="adhd">ADHD</label>
                  </p>
                  <p>
                    <input type="checkbox" name="allergies" id="allergies" tabindex="520" />
                    <label for="allergies">Alergias</label>
                  </p>
                  <p>
                    <input type="checkbox" name="arthritis" id="arthritis" tabindex="530" />
                    <label for="arthritis">Artritis</label>
                  </p>
                  <p>
                    <input type="checkbox" name="asthma" id="asthma" tabindex="540" />
                    <label for="asthma">Asma</label>
                  </p>
                  <p>
                    <input type="checkbox" name="backPain" id="backPain" tabindex="550" />
                    <label for="backPain">Dolor de Espalda</label>
                  </p>
                  <p>
                    <input type="checkbox" name="breastCancer" id="breastCancer" tabindex="560" />
                    <label for="breastCancer">Cancer de Seno</label>
                  </p>
                </div>
                <div class="col12">
                  <p>
                    <input type="checkbox" name="colonCancer" id="colonCancer" tabindex="570" />
                    <label for="colonCancer">Cancer del Colon</label>
                  </p>
                  <p>
                    <input type="checkbox" name="prostateCancer" id="prostateCancer" tabindex="580" />
                    <label for="prostateCancer">Cancer de la Próstata</label>
                  </p>
                  <p>
                    <input type="checkbox" name="otherCancer" id="otherCancer" tabindex="590" />
                    <label for="otherCancer">Otro tipo de Cancer</label>
                  </p>
                  <p>
                    <input type="checkbox" name="depreAnxi" id="depreAnxi" tabindex="600" />
                    <label for="depreAnxi">Depresión/Ansiedad</label>
                  </p>
                  <p>
                    <input type="checkbox" name="diabetes1" id="diabetes1" tabindex="610" />
                    <label for="diabetes1">Diabetes Tipo 1</label>
                  </p>
                  <p>
                    <input type="checkbox" name="diabetes2" id="diabetes2" tabindex="620" />
                    <label for="diabetes2">Diabetes Tipo 2</label>
                  </p>
                </div>
                <div class="col13">
                  <p>
                    <input type="checkbox" name="heartCond" id="heartCond" tabindex="630" />
                    <label for="heartCond">Condición del Corazón</label>
                  </p>
                  <p>
                    <input type="checkbox" name="highChol" id="highChol" tabindex="640" />
                    <label for="highChol">Colesterol Alto</label>
                  </p>
                  <p>
                    <input type="checkbox" name="highBldPres" id="highBldPres" tabindex="650" />
                    <label for="highBldPres">Presión Alta</label>
                  </p>
                  <p>
                    <input type="checkbox" name="hivAids" id="hivAids" tabindex="660" />
                    <label for="hivAids">HIV/SIDA</label>
                  </p>
                  <p>
                    <input type="checkbox" name="migrane" id="migrane" tabindex="670" />
                    <label for="migrane">Migraña</label>
                  </p>
                  <p>
                    <input type="checkbox" name="obesity" id="obesity" tabindex="680" />
                    <label for="obesity">Obesidad</label>
                  </p>
                </div>
                <div class="col14">
                  <p>
                    <input type="checkbox" name="otherMedCond" id="otherMedCond" tabindex="690" />
                    <label for="otherMedCond">Otra condición médica</label>
                  </p>
                </div>
              </fieldset>
            </div>
          </div>
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">Información sobre Electrodométicos</div>
            <div class="AccordionPanelContent">
              <h3>¿Cúal de los siguientes electrodomésticos tiene en su hogar?(seleccione todas lasque apliquen) </h3>
              <fieldset id="electronicsInfo">
                <div class="col15">
                  <p>
                    <input type="checkbox" name="cableTV" id="cableTV" tabindex="700" />
                    <label for="cableTV">Cable TV</label>
                  </p>
                  <p>
                    <input type="checkbox" name="digiCableTV" id="digiCableTV" tabindex="710" />
                    <label for="digiCableTV">Digital Cable TV</label>
                  </p>
                  <p>
                    <input type="checkbox" name="satTV" id="satTV" tabindex="720" />
                    <label for="satTV">Satellite TV</label>
                  </p>
                  <p>
                    <input type="checkbox" name="hdtv" id="hdtv" tabindex="730" />
                    <label for="hdtv">HDTV</label>
                  </p>
                  <p>
                    <input type="checkbox" name="plasmaTV" id="plasmaTV" tabindex="740" />
                    <label for="plasmaTV">Plasma TV</label>
                  </p>
                  <p>
                    <input type="checkbox" name="lcdTV" id="lcdTV" tabindex="750" />
                    <label for="lcdTV">LCD TV</label>
                  </p>
                  <p>
                    <input type="checkbox" name="gps" id="gps" tabindex="760" />
                    <label for="gps">GPS</label>
                  </p>
                </div>
                <div class="col16">
                  <p>
                    <input type="checkbox" name="hTS" id="hTS" tabindex="770" />
                    <label for="hTS">Sistema de Teatro Casero</label>
                  </p>
                  <p>
                    <input type="checkbox" name="mp3Plyr" id="mp3Plyr" tabindex="780" />
                    <label for="mp3Plyr">Reproductor MP3</label>
                  </p>
                  <p>
                    <input type="checkbox" name="satRad" id="satRad" tabindex="790" />
                    <label for="satRad">Radio Satelite</label>
                  </p>
                  <p>
                    <input type="checkbox" name="digiVidRec" id="digiVidRec" tabindex="800" />
                    <label for="digiVidRec">Grabadora  Video Digital</label>
                  </p>
                  <p>
                    <input type="checkbox" name="dvdPlyr" id="dvdPlyr" tabindex="810" />
                    <label for="dvdPlyr">Reproductor DVD</label>
                  </p>
                  <p>
                    <input type="checkbox" name="digiCam" id="digiCam" tabindex="820" />
                    <label for="digiCam">Camara Digital</label>
                  </p>
                  <p>
                    <input type="checkbox" name="digiVidCam" id="digiVidCam" tabindex="830" />
                    <label for="digiVidCam">Camara De Video Digital</label>
                  </p>
                </div>
                <div class="col17">
                  <p>¿Juega video juegos, usted u tora persona en su hogar? </p>
                  <p>
                    <label>
                      <input type="radio" name="regulerlyplayRadGroup" value="true" id="regulerlyplayRadGroup_0" tabindex="840"/>
                      Sí</label>
                    <label>
                      <input type="radio" name="regulerlyplayRadGroup" value="false" id="regulerlyplayRadGroup_1" tabindex="850"/>
                      No</label>
                  </p>
                  <p>En caso de sí, seleccione las que apliquen. <br />
                  </p>
                  <div class="col17b">
                    <p>
                      <input type="checkbox" name="pc" id="pc" tabindex="860" />
                      <label for="pc">PC</label>
                    </p>
                    <p>
                      <input type="checkbox" name="wii" id="wii" tabindex="870" />
                      <label for="wii">Nintendo Wii</label>
                    </p>
                    <p>
                      <input type="checkbox" name="xBox" id="xBox" tabindex="880" />
                      <label for="xBox">XBox</label>
                    </p>
                    <p>
                      <input type="checkbox" name="xBox360" id="xBox360" tabindex="890" />
                      <label for="xBox360">XBox 360</label>
                    </p>
                    <p>
                      <input type="checkbox" name="playstation2" id="playstation2" tabindex="900" />
                      <label for="playstation2">Playstation 2</label>
                    </p>
                  </div>
                  <div class="col17c">
                    <p>
                      <input type="checkbox" name="playstation3" id="playstation3" tabindex="910" />
                      <label for="playstation3">Playstation 3</label>
                    </p>
                    <p>
                      <input type="checkbox" name="interactOnline" id="interactOnline" tabindex="920" />
                      <label for="interactOnline">Juego en Línea</label>
                    </p>
                    <p>
                      <input type="checkbox" name="portblGaming" id="portblGaming" tabindex="930" />
                      <label for="portblGaming">Juego Portátil</label>
                    </p>
                    <p>
                      <input type="checkbox" name="othr" id="othr" tabindex="940" />
                      <label for="othrPet">Otro</label>
                    </p>
                    <p>
                      <label for="howManyHrs">¿Cuantas horas?</label>
                      <select name="howManyHrs" id="howManyHrs" tabindex="950">
                        <option value="0">Seleccione</option>
                        <option value="1">1-5</option>
                        <option value="2">6-10</option>
                        <option value="3">11-15</option>
                        <option value="4">16-20</option>
                        <option value="5">21-25</option>
                        <option value="6">sobre 25</option>
                      </select>
                    </p>
                  </div>
                </div>
              </fieldset>
              <p>&nbsp; </p>
            </div>
          </div>
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">Información sobre Éstilo de Vida</div>
            <div class="AccordionPanelContent">
              <fieldset id="lifestyleInfo">
                <div class="col15">
                  <h3>¿Tiene mascotas?</h3>
                  <p>Seleccione las que apliquen. </p>
                  <p>
                    <input type="checkbox" name="dog" id="dog" tabindex="960" />
                    <label for="dog">Perro</label>
                  </p>
                  <p>
                    <input type="checkbox" name="cat" id="cat" tabindex="970" />
                    <label for="cat">Gato</label>
                  </p>
                  <p>
                    <input type="checkbox" name="othrPet" id="othrPet" tabindex="980" />
                    <label for="othrPet">Otro</label>
                  </p>
                </div>
                <div class="col16">
                  <h3>Hábitos de Fumador </h3>
                  <p>¿Fumas Cigarrillos?</p>
                  <p>
                    <label>
                      <input type="radio" name="RadioGroupDoUSmoke" value="true" id="RadioGroupDoUSmoke_0" tabindex="990"/>
                      Sí</label>
                    <label>
                      <input type="radio" name="RadioGroupDoUSmoke" value="false" id="RadioGroupDoUSmoke_1" tabindex="1000"/>
                      No</label>
                  </p>
                  <p>
                    <label for="cigarretteBrand">Marca:</label>
                    <select name="cigarretteBrand" id="cigarretteBrand" tabindex="1010">
                      <option value="0" selected="selected">Seleccione</option>
                      <option value="3">Basic</option>
                      <option value="4">Camel</option>
                      <option value="5">Doral</option>
                      <option value="6">Kool</option>
                      <option value="7">Malboro</option>
                      <option value="8">Merit</option>
                      <option value="9">Newport</option>
                      <option value="1">Otra Marca</option>
                      <option value="10">Parliament</option>
                      <option value="11">Salem</option>
                      <option value="2">Varias</option>
                      <option value="12">Virgina Slims</option>
                      <option value="13">Winston</option>
                    </select>
                  </p>
                  <p>¿Fuma Cigarros?</p>
                  <p>
                    <label>
                      <input type="radio" name="RadioGroupDoUSmokeCigar" value="true" id="RadioGroupDoUSmokeCigar_1" tabindex="1020" />
                      Sí</label>
                    <label>
                      <input type="radio" name="RadioGroupDoUSmoke" value="false" id="RadioGroupDoUSmoke_1" tabindex="1030"/>
                      No</label>
                  </p>
                  <p>
                    <label for="cigStrength">¿Qué Tipo?</label>
                    <select name="cigStrength" id="cigStrength" tabindex="1040">
                      <option value="0" selected="selected">Seleccione</option>
                      <option value="Liviano">Liviano</option>
                      <option value="Medio">Medio</option>
                      <option value="Regular">Regular</option>
                      <option value="Ultra Livianos">Ultra Livianos</option>
                    </select>
                  </p>
                  <p>
                    <label for="cigFlav">¿Qué Sabor?</label>
                    <select name="cigFlav" id="cigFlav" tabindex="1050">
                      <option value="0">Seleccione</option>
                      <option value="1">Mentol</option>
                      <option value="2">Regular</option>
                    </select>
                  </p>
                  <p>
                    <label for="howManyPacks">¿Cuántos al Día?</label>
                    <select name="howManyPacks" id="howManyPacks" tabindex="1060">
                      <option value="0" selected="selected">Seleccione</option>
                      <option value="1/2">1/2 Caja al día</option>
                      <option value="1-2">1-2 Cajas al día</option>
                      <option value="2-3">2-3 Cajas al día</option>
                    </select>
                  </p>
                </div>
                <div class="col17">
                  <h3>Hábitos de Tomador</h3>
                  <p>¿Consume usted algunas de estas bebidas alcoholicas? <br />
                    Selecione las que apliquen. </p>
                  <div class="col17b">
                    <p>
                      <input type="checkbox" name="vodka" id="vodka" tabindex="1070" />
                      <label for="vodka">Vodka</label>
                    </p>
                    <p>
                      <input type="checkbox" name="gin" id="gin" tabindex="1080" />
                      <label for="gin">Ginebra</label>
                    </p>
                    <p>
                      <input type="checkbox" name="scotch" id="scotch" tabindex="1090" />
                      <label for="scotch">Scotch</label>
                    </p>
                    <p>
                      <input type="checkbox" name="tequila" id="tequila" tabindex="1100" />
                      <label for="tequila">Tequila</label>
                    </p>
                    <p>
                      <input type="checkbox" name="rum" id="rum" tabindex="1110" />
                      <label for="rum">Ron</label>
                    </p>
                  </div>
                  <div class="col17c">
                    <p>
                      <input type="checkbox" name="wine" id="wine" tabindex="1120" />
                      <label for="wine">Vino</label>
                    </p>
                    <p>
                      <input type="checkbox" name="wiskey" id="wiskey" tabindex="1130" />
                      <label for="wiskey">Wiskey</label>
                    </p>
                    <p>
                      <input type="checkbox" name="champagne" id="champagne" tabindex="1140" />
                      <label for="champagne">Champaña</label>
                    </p>
                    <p>
                      <input type="checkbox" name="bourbon" id="bourbon" tabindex="1150" />
                      <label for="bourbon">Bourbon</label>
                    </p>
                    <p>
                      <input type="checkbox" name="beer" id="beer" tabindex="1160" />
                      <label for="beer">Cerveza</label>
                    </p>
                  </div>
                  <p>¿Consume usted algunas de estas bebidas no alcoholicas? <br />
                    Seleccione las que apliquen. </p>
                  <div class="col17c">
                    <p>
                      <input type="checkbox" name="wtr" id="wtr" tabindex="1170" />
                      <label for="wtr">Agua</label>
                    </p>
                    <p>
                      <input type="checkbox" name="flvBtlWtr" id="flvBtlWtr" tabindex="1180" />
                      <label for="flvBtlWtr">Agua Embotellada</label>
                    </p>
                    <p>
                      <input type="checkbox" name="enrgDrnk" id="enrgDrnk" tabindex="1190" />
                      <label for="enrgDrnk">Bebida de Energía</label>
                    </p>
                    <p>
                      <input type="checkbox" name="coffee" id="coffee" tabindex="1200" />
                      <label for="coffee">Café</label>
                    </p>
                  </div>
                  <div class="col17c">
                    <p>
                      <input type="checkbox" name="tea" id="tea" tabindex="1210" />
                      <label for="tea">Té</label>
                    </p>
                    <p>
                      <input type="checkbox" name="iceT" id="iceT" tabindex="1220" />
                      <label for="iceT">Té Frío</label>
                    </p>
                    <p>
                      <input type="checkbox" name="milk" id="milk" tabindex="1230" />
                      <label for="milk">Leche</label>
                    </p>
                    <p>
                      <input type="checkbox" name="ohterDrnk" id="ohterDrnk" tabindex="1240" />
                      <label for="ohterDrnk">Otro Tipo</label>
                    </p>
                  </div>
                </div>
              </fieldset>
            </div>
          </div>
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">Información Technológica</div>
            <div class="AccordionPanelContent">
              <fieldset id="techInfo">
                <div class="col15">
                  <h3>¿Tiene Internet?</h3>
                  <p>
                    <label>
                      <input type="radio" name="RadioGroupInternet" value="true" id="RadioGroupInternet_0" tabindex="1250"/>
                      Sí</label>
                    <label>
                      <input type="radio" name="RadioGroupInternet" value="false" id="RadioGroupInternet_1" tabindex="1260"/>
                      No</label>
                  </p>
                  <p>
                    <label for="connectionType">¿Que tipo de conección?</label>
                    <select name="connectionType" id="connectionType" tabindex="1270">
                      <option value="0" selected="selected">Seleccione</option>
                      <option value="Broadband">Broadband</option>
                      <option value="Narrowband">Narrowband</option>
                    </select>
                  </p>
                  <p>
                    <label for="howConnect">¿Como se conecta al internet?</label>
                    <select name="howConnect" id="howConnect" tabindex="1280">
                      <option value="0" selected="selected">Seleccione</option>
                      <option value="Wireless">Wireless</option>
                      <option value="Wired">Wired</option>
                    </select>
                  </p>
                </div>
                <div class="col16">
                  <h3>¿Tipo de computador que posee?</h3>
                  <p>
                    <input type="checkbox" name="desktopPC" id="desktopPC" tabindex="1290" />
                    <label for="desktopPC">PC de Mesa</label>
                  </p>
                  <p>
                    <input type="checkbox" name="desktopMac" id="desktopMac" tabindex="1300" />
                    <label for="desktopMac">Mac de Mesa</label>
                  </p>
                  <p>
                    <input type="checkbox" name="labtopPc" id="labtopPc" tabindex="1310" />
                    <label for="labtopPc">PC Portátil</label>
                  </p>
                  <p>
                    <input type="checkbox" name="labtopMac" id="labtopMac" tabindex="1320" />
                    <label for="labtopMac">Mac Portátil</label>
                  </p>
                  <p>
                    <input type="checkbox" name="tablet" id="tablet" tabindex="1330" />
                    <label for="tablet">Tableta</label>
                  </p>
                  <p>
                    <input type="checkbox" name="dontHave" id="dontHave" tabindex="1340" />
                    <label for="dontHave">No tengo</label>
                  </p>
                </div>
                <div class="col16">
                  <h3>¿Tipo de PDA que posee?</h3>
                  <p>
                    <input type="checkbox" name="palm" id="palm" tabindex="1350" />
                    <label for="palm">Palm</label>
                  </p>
                  <p>
                    <input type="checkbox" name="visor" id="visor" tabindex="1360" />
                    <label for="visor">Visor</label>
                  </p>
                  <p>
                    <input type="checkbox" name="sony" id="sony" tabindex="1370" />
                    <label for="sony">Sony</label>
                  </p>
                  <p>
                    <input type="checkbox" name="compaqHQ" id="compaqHQ" tabindex="1380" />
                    <label for="compaqHQ">Compaq/HQ</label>
                  </p>
                  <p>
                    <input type="checkbox" name="blackberry" id="blackberry" tabindex="1390" />
                    <label for="blackberry">Blacberry</label>
                  </p>
                  <p>
                    <input type="checkbox" name="ipaq" id="ipaq" tabindex="30" />
                    <label for="ipaq">IPAQ</label>
                  </p>
                  <p>
                    <input type="checkbox" name="tMobilePDA" id="tMobilePDA" tabindex="1400" />
                    <label for="tMobilePDA">Tmobile</label>
                  </p>
                  <p>
                    <input type="checkbox" name="dell" id="dell" tabindex="1410" />
                    <label for="dell">Dell</label>
                  </p>
                  <p>
                    <input type="checkbox" name="samsung" id="samsung" tabindex="1420" />
                    <label for="samsung">Samsumg</label>
                  </p>
                  <p>
                    <input type="checkbox" name="other" id="other" tabindex="1430" />
                    <label for="other">Other</label>
                  </p>
                  <p>
                    <input type="checkbox" name="dontHvePda" id="dontHvePda" tabindex="1440" />
                    <label for="dontHvePda">Do not have PDA</label>
                  </p>
                </div>
                <div class="col16">
                  <h3>¿Quien es su proveedor En Línea?</h3>
                  <p>
                    <input type="checkbox" name="aol" id="aol" tabindex="1450" />
                    <label for="aol">AOL</label>
                  </p>
                  <p>
                    <input type="checkbox" name="att" id="att" tabindex="1460" />
                    <label for="att">AT&T Worldnet</label>
                  </p>
                  <p>
                    <input type="checkbox" name="bellSouth" id="bellSouth" tabindex="1470" />
                    <label for="bellSouth">Bell South</label>
                  </p>
                  <p>
                    <input type="checkbox" name="cblVision" id="cblVision" tabindex="1480" />
                    <label for="cblVision">Cablevision</label>
                  </p>
                  <p>
                    <input type="checkbox" name="comcast" id="comcast" tabindex="1490" />
                    <label for="comcast">Comcast</label>
                  </p>
                  <p>
                    <input type="checkbox" name="cox" id="cox" tabindex="1500" />
                    <label for="cox">Cox</label>
                  </p>
                  <p>
                    <input type="checkbox" name="earthL" id="earthL" tabindex="1510" />
                    <label for="earthL">Earthlink</label>
                  </p>
                  <p>
                    <input type="checkbox" name="msn" id="msn" tabindex="1520" />
                    <label for="msn">MSN</label>
                  </p>
                  <p>
                    <input type="checkbox" name="net0" id="net0" tabindex="1530" />
                    <label for="net0">Netzero</label>
                  </p>
                  <p>
                    <input type="checkbox" name="prodigy" id="prodigy" tabindex="1540" />
                    <label for="prodigy">Prodigy</label>
                  </p>
                  <p>
                    <input type="checkbox" name="rcn" id="rcn" tabindex="1550" />
                    <label for="rcn">RCN</label>
                  </p>
                  <p>
                    <input type="checkbox" name="rr" id="rr" tabindex="1560" />
                    <label for="rr">Road Runner</label>
                  </p>
                  <p>
                    <input type="checkbox" name="verizon" id="verizon" tabindex="1570" />
                    <label for="verizon">Verizon</label>
                  </p>
                  <p>
                    <input type="checkbox" name="juno" id="juno" tabindex="1580" />
                    <label for="juno">Juno<br />
                    </label>
                  </p>
                  <p>
                    <input type="checkbox" name="mci" id="mci" tabindex="1590" />
                    <label for="mci">MCI</label>
                  </p>
                  <p>
                    <input type="checkbox" name="other2" id="other2" tabindex="1600" />
                    <label for="other2">Otro<br />
                      <br />
                    </label>
                    <input type="checkbox" name="notOn" id="notOn" tabindex="1610" />
                    <label for="notOn">No EnLínea</label>
                  </p>
                </div>
              </fieldset>
              <div class="submitBtn">
                <input name="submit" type="submit" class="submitBtn" id="submit" value="Enviar" />
              </div>
            </div>
          </div>
        </div>
        <input type="hidden" name="MM_insert" value="spanishForm" />
      </form>
    </div>
  </div>
</div>
<?php include("../includes/subPagesFooter.php"); ?>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("HorNav", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});

var AccordionForm = new Spry.Widget.Accordion("AccordionForm");
var sprytextfield2 = new Spry.Widget.ValidationTextField("spryLastName", "none", {hint:"Apellido", maxChars:50, validateOn:["blur"]});
var sprytextfield3 = new Spry.Widget.ValidationTextField("spryDob", "date", {hint:"Fecha De Nacimiento", validateOn:["blur"], isRequired:false, format:"mm/dd/yyyy"});
var sprytextfield1 = new Spry.Widget.ValidationTextField("spryfirstName", "none", {hint:"Primer Nombre", maxChars:50, validateOn:["blur"]});
var sprytextfield4 = new Spry.Widget.ValidationTextField("spryZipCode", "zip_code", {hint:"C\xF3digo Postal", validateOn:["blur"]});
var sprytextfield5 = new Spry.Widget.ValidationTextField("spryCell", "phone_number", {hint:"Tel\xE9fono Celular", validateOn:["blur"], isRequired:false});
var sprytextfield6 = new Spry.Widget.ValidationTextField("spryHomePhone", "phone_number", {validateOn:["blur"], isRequired:false});
var sprytextfield7 = new Spry.Widget.ValidationTextField("spryWorkPhone", "phone_number", {validateOn:["blur"], isRequired:false});
var sprytextfield8 = new Spry.Widget.ValidationTextField("spryEmail", "email", {hint:"Correo Electr\xF3nico.", validateOn:["blur"]});
swfobject.registerObject("FlashID");
</script>
</body>
</html>
<?php
mysql_free_result($rsStates);

mysql_free_result($rsAge);
?>

Re: PHP Notice: Undefined index:…

Posted: Sat Dec 18, 2010 11:19 am
by whkowiak
well I ran into that probleł recently and one good explanation I found was there:
http://www.dmxzone.com/go?13811
As far as I understood, when you use GET or POST and that your variable is not already, php gives you this notice because he encounters a variable that wasn´t sent before.
So you have to set it before it appears in the code and then php will be happy and souldn't show you the notice.
I used the if(!isset()) {} and this way I didn´t get the notice afterwards.
I am not a big fan of modifying the php.ini file to hide the notifications as it just hides the problems but doesn´t actually solve them.