Right now with this line of code, i'm only getting the index, i need the value:
Code: Select all
$partno = $_POST['secondChoice'];Moderator: General Moderators
Code: Select all
$partno = $_POST['secondChoice'];Code: Select all
<SELECT NAME="firstChoice" ID="firstChoice" ONCHANGE="selectChange(this, genericform.secondChoice, arrItems1, arrItemsGrp1);">
<OPTION VALUE="0" selected <?php if(@strcmp($_POST['firstChoice'], 'Select Unit') == 0) echo "SELECTED";?>> Select Unit </OPTION>
<OPTION VALUE="1" <?php if(@strcmp($_POST['firstChoice'], 'SDC1-2') == 0) echo "SELECTED";?>> SDC1-2 </OPTION>
<OPTION VALUE="2" <?php if(@strcmp($_POST['firstChoice'], 'P73 Kit') == 0) echo "SELECTED";?>> P73 Kit </OPTION>
<OPTION VALUE="3" <?php if(@strcmp($_POST['firstChoice'], 'MDR2-2') == 0) echo "SELECTED";?>> MDR2-2 </OPTION>
<OPTION VALUE="4" <?php if(@strcmp($_POST['firstChoice'], 'CSD1-3') == 0) echo "SELECTED";?>> CSD1-3 </OPTION>
<OPTION VALUE="5" <?php if(@strcmp($_POST['firstChoice'], 'CSD1-4') == 0) echo "SELECTED";?>> CSD1-4 </OPTION>
<OPTION VALUE="6" <?php if(@strcmp($_POST['firstChoice'], 'MLS1-1') == 0) echo "SELECTED";?>> MLS1-1 </OPTION>
</SELECT>
Unit Part # <SELECT NAME="secondChoice" ID="secondChoice">
<INPUT TYPE=submit VALUE="Load" NAME="loadData">
<?php
if(isset($_POST['loadData']))
{
require_once('./mysql_connect.php');
$description = $_POST['firstChoice'];
$partno = $_POST['secondChoice'];
$query = "SELECT description, partno FROM systemconfig_generic WHERE $description = description AND $partno = partno";
$result = @mysql_query($query);
if($result)
{
echo 'Description: ' .$description . '<BR>';
echo 'Part No Found: ' .$partno . '<BR>';
}
else
{
echo 'No Part No Found <BR>';
}
}Code: Select all
$description = $_POST['firstChoice'];
$partno = $_POST['secondChoice'];