Forum Sign UP Login Contact Us
HOME : Forum : SQL and Database : Post New Topic
Form dropdown dependency
adamsalam
04:23:12 13:38
Hi ,

this is mt first post, i hope I can _GET and _POST what can be considered good contribution in this forum..

I am designing a registration form, this form has some drop down menus some of them about 2 of them depending on each other. I am using PHP / MySQL
the drop down items are saved in MySQL and the form entries should be inserted in a main table. how I can accomplish that, I tried to adopt some of the ready code but seem i should create my own from scratch :(

the form is as following:
<html>
<body>

<form action="the_action.php" method="post">


Full Name<br/>

<input type="text" id="Full Name" name="Full Name" value="Full name" size="30" maxlength="1024"/><br/><br/>

Date of birth<br/>
Day:<input type="text" id="dob" name="dob" value="DD" size="2" maxlength="2"/>
Month:<input type="text" id="mob" name="mob" value="MM" size="2" maxlength="2"/>
Year:<input type="text" id="yob" name="yob" value="YYYY" size="4" maxlength="4"/>

<br/><br/>

Sex<br/><select id="Sex" name="Sex" size="1">

<option value="Male">Male</option>

<option value="Female">Female</option>

</select><br/><br/>

Highest Degree<br/>

<select id="Highest Degree" name="Highest Degree" size="1">

<option value="Certification">Certification</option>

<option value="Higher Diploma">Higher Diploma</option>

<option value="BSc">BSc</option>

<option value="Masters">Masters</option>

<option value="PhD ">PhD </option>

</select><br/><br/>

Scientific Discipline<br/><br/>

<select id="Scientific Discipline" name="Scientific Discipline" size="1">

<option value="Applied Mathematics">Applied Mathematics</option>

<option value="Economics">Economics</option>

<option value="Engineering">Engineering</option>

<option value="Humanity">Humanity</option>

<option value="Natural">Natural</option>

<option value="Medical">Medical</option>

</select><br/><br/>

Precise Speciality<br/>

<select id="Precise Speciality" name="Precise Speciality" size="1">

<option value="One">One</option>

<option value="Two">Two</option>

<option value="Three">Three</option>

</select><br/><br/>

Current Job<br/>

<select id="Current Job" name="Current Job" size="1">

<option value="Academic">Academic</option>

<option value="Professional">Professional</option>

</select><br/><br/>

Years of job experience<br/>
<select id="Years of job experience" name="Years of job experience" size="1">

<option value="0">0</option>

<option value="1-2">1-2</option>

<option value="3-5">3-5</option>

<option value="5-10">5-10</option>

<option value="More than 10">More than10</option>

</select><br/><br/>

Current place of work<br/>

<select id="Current place of work" name="Current place of work" size="1">

<option value="Libya">Libya</option>

<option value="Abroad">Abroad</option>

</select><br/><br/>

Email contact<br/>

<input type="text" id="Email contact" name="Email contact" value="email address" size="30" maxlength="1024"/><br/><br/>

Skype contact<br/>

<input type="text" id="Skype contact" name="Skype contact" value="" size="30" maxlength="1024"/><br/><br/>

Telephone contact<br/>

<input type="text" id="Telephone contact" name="Telephone contact" value="" size="30" maxlength="1024"/><br/><br/>

Facebook URL<br/>

<input type="text" id="Facebook URL" name="Facebook URL" value="" size="30" maxlength="1024"/><br/><br/>

Like to contribute to GLASP?<br/>

<select id="Like to contribute to GLASP?" name="Like to contribute to GLASP?" size="1">

<option value="Yes">Yes</option>

<option value="No">No</option>

</select><br/><br/>

<input type="submit" id="Register for GLASP" name="Register for GLASP" value="Register!"/><br/><br/>


<input id="form_id" type="hidden" name="form_id" value="189757"/><br/>

</form>

</body>

</html>
subhendu
05:06:12 04:42
This is very difficult to if full code is given like this. Please try first and let us know if any error message or problem you are facing
adamsalam
05:07:12 03:46
thank you for your reply, though i have a considerable progress in the same application since the above post.

now I have the form run as expected.....but....

1- I need the mechanism of how to submit the user input to the database...

2- how to validate data entered such like email telephone number ....regular expression..

3- make the application work in case javascript is disabled on the client browser

could you please help on that...

here is the full running application PHP/Javascript code:

adamsalam
05:07:12 03:50

Sorry the code.....

<?php
//DECLARE VARIABLES USED IN THE FORM <SELECT >
$branch = null;
$speciality = null;
$expertise = null;
$contrib = null;
$contribime = null;
$currentwork = null;
$county = null;

$conn = mysql_connect('localhost', 'username', 'password');
$db = mysql_select_db('glaspmembership',$conn); // glaspmembership = DATABASE NAME

if(isset($_GET["branch"]) && is_numeric($_GET["branch"])) // [1ST VARIABLE NAME DECLARED ABOVE]
{
$branch = $_GET["branch"];
}

if(isset($_GET["speciality"]) && is_numeric($_GET["speciality"])) // [2ND VARIABLE NAME DECLARED ABOVE]
{
$speciality = $_GET["speciality"];
}

if(isset($_GET["expertise"]) && is_numeric($_GET["expertise"])) // [3RD VARIABLE NAME DECLARED ABOVE]
{
$expertise = $_GET["expertise"];
}

?>

<script language="JavaScript">

function autoSubmit()
{
var formObject = document.forms['glaspfrm'];
formObject.submit();
}

</script>
<!---------------------STARTING FORM---------------------------->
<form action="" name="glaspfrm" method="GET">

<!-- branch SELECTION , in later development it should fetched from the db -->
Scientific Branch:
<select name="branch" onChange="autoSubmit();">
<option value="null"></option>
<option value="1" <?php if($branch == 1) echo " selected"; ?>>BRANCH OF MEDICAL SCIENCES(BMS)</option>
<option value="2" <?php if($branch == 2) echo " selected"; ?>>BRANCH OF NATURAL SCIENCES(BNS)</option>
<option value="3" <?php if($branch == 3) echo " selected"; ?>>BRANCH OF ENGINEERING SCIENCES(BES)</option>
<option value="4" <?php if($branch == 4) echo " selected"; ?>>BRANCH OF ECONOMICS & APPLIED MATHEMATICAL(BEAMS)</option>
<option value="5" <?php if($branch == 5) echo " selected"; ?>>BRANCH OF HUMANITY SCIENCES(BHS)</option>
</select>
<br><br>

<!-- speciality SELECTION BASED ON branch VALUE -->

<?php

if($branch != null && is_numeric($branch))
{
?>
Select Speciality:
<select name="speciality" onChange="autoSubmit();">
<option value="null"></option>

<?php

//POPULATE DROP DOWN MENU WITH SPECIALITIES FROM A GIVEN branch

$sql = "SELECT speciality_id, speciality FROM tab_bms WHERE branch_id = $branch";
$specialities = mysql_query($sql,$conn);

while($row = mysql_fetch_array($specialities))
{
echo ("<option value=\"$row[speciality_id]\" " . ($speciality == $row["speciality_id"] ? " selected" : "") . ">$row[speciality]</option>");
}

?>

</select>

<?php
}

?>

<br><br>

<?php

if($speciality != null && is_numeric($speciality) && $branch != null)
{

?>

Select Expertise:
<select name="expertise" onChange="autoSubmit();">
<option value="null"></option>

<?php

//POPULATE DROP DOWN MENU WITH expertises FROM A GIVEN branch, speciality

$sql = "SELECT expertise_id, expertise FROM tab_bmse WHERE speciality_id = $speciality";
$expertises = mysql_query($sql,$conn);

while($row = mysql_fetch_array($expertises))
{
echo ("<option value=\"$row[expertise_id]\" " . ($expertise == $row["expertise_id"] ? " selected" : "") . ">$row[expertise]</option>");
}

?>

</select>

<?php
}
?>
<br><br>

<tr><td>Full Name (Arabic):
<input type="text" id="fullnamea" name="fullnamea" value="Full name in Arabic" size="30" maxlength="1024"/>

<br><br>

Full Name:
<input type="text" id="fullname" name="fullname" value="Full name in English" size="30" maxlength="1024"/>

<br><br>

Age:
<select id="Age" name="Age" size="1">
<option value="25-34">25-34</option>
<option value="35-44">35-44</option>
<option value="45-54">45-54</option>
<option value="55-65">55-65</option>
<option value="66-75">66-75</option>
<option value="76-85">76-85</option>
</select>

<br><br>

Sex:
<select id="Sex" name="Sex" size="1">
<option value="Male">Male</option>
<option value="Female">Female</option>
</select>

<br><br>

Highest Degree:
<select id="Highestdegree" name="Highestdegree" size="1">
<option value="Certification">Certification</option>
<option value="Higher Diploma">Higher Diploma</option>
<option value="BSc">BSc</option>
<option value="Masters">Masters</option>
<option value="PhD ">PhD </option>
</select>

<br><br>

<!-----------------The Rest of the Manual Form coming here---------------->
Current Job:
<select id="currentjob" name="currentjob" size="1">
<option value="Academic">Academic</option>
<option value="Professional">Professional</option>
</select>
<br><br>

Year career started:
<select id="experience" name="experience" size="1">
<option value="0">2012</option>
<option value="2010-2011">2010-2011</option>
<option value="2007-2009">2007-2009</option>
<option value="2002-2006">2002-2006</option>
<option value="1997-2001">1997-2001</option>
<option value="before-1997">Before 1997</option>
</select>

<br><br>

Current place of work:
<select id="currentplace" name="currentplace" size="1">
<option value="Libya">Libya</option>
<option value="Abroad">Abroad</option>
</select>

<br><br>

<!---------Depending on currentwork---------->
Your county in Libya:
<select id="county" name="county" size="1">
<option value="Ajdabiya">Ajdabiya</option>
<option value="Al-Bayda">Al-Bayda</option>
<option value="Al-Khums">Al-Khums</option>
<option value="Benghazi">Benghazi</option>
<option value="Gharyan">Gharyan</option>
<option value="Kufra">Kufra</option>
<option value="Misrata">Misrata</option>
<option value="Sabha">Sabha </option>
<option value="Sirte">Sirte</option>
<option value="Tobruk">Tobruk</option>
<option value="Tripoli">Tripoli</option>
<option value="Zawiya">Zawiya</option>


</select>

<br><br>

Email contact:
<input type="text" id="email" name="email" value="email" size="30" maxlength="1024"/>

<br><br>

Skype contact:
<input type="text" id="skype" name="skype" value="" size="30" maxlength="1024"/>

<br><br>

Telephone contact:
<input type="text" id="telephone" name="telephone" value="" size="30" maxlength="1024"/>

<br><br>

Facebook account:
<input type="text" id="facebook" name="facebook" value="" size="30" maxlength="1024"/>

<br><br>

Like to contribute to GLASP?:
<select id="contrib" name="contrib" size="1">
<option value="Yes">Yes</option>
<option value="No">No</option>
</select>

<br><br>
<!---------Depending on CONTRIBUTE---------->
Time will provide per week?
<select id="contribtime" name="contribtime" size="1">
<option value="Yes">8 Hours</option>
<option value="Yes">8 - 16 Hours</option>
<option value="Yes">17 - 24 Hours</option>
<option value="Yes">25 - 32 Hours</option>
<option value="Yes">33 - 40 Hours</option>
<option value="Yes">Full time</option>
</select>
<br><br>

<input type="submit" id="register" name="register" value="Register" />


<br><br>
<br><br><br><br>
</table>
</form>


adamsalam
05:07:12 05:07
I know that I need to use "$VARIABLES" to send each data item to the database....
but still could not compile the same code..

I think I need so I need to use the claus
INSERT INTO TABLE_NAME VALUES ("'', $fullnamea', $fullname', $age', $sex', $highestdegree', $branch', $speciality', $expertise', $currentjob', $experience', $currentwork', $county', $email', $skype', $telephone', $facebook', $contrib', $contribtime'");

subhendu
05:07:12 09:11
Before entering data to database first display them , your form should able to submit data to the action page and then collect and display all data your entered in the form should be available.

Then using the variables build the query to insert to database ,
adamsalam
05:07:12 13:21
Thank you ...

ok that was my question...

as you can see the mechanism of dropdown DEPENDENCY is already on the same page...
upssss .... i need more dependency in

Like to contribute to GLASP?:
<select id="contrib" name="contrib" size="1">
<option value="Yes">Yes</option>
<option value="No">No</option>
</select>

<br><br>
<!---------Depending on "contrib" above---------->
Time will provide per week?

other thing is I am confused building the ACTION page?...

subhendu
05:08:12 12:19
Try to learn more on form and how it works in PHP. There is a basic form script in PHP to handle the data entered.
shaneward
05:29:12 09:09
I work for a wastewater treatment company and am trying to move our service reports to a paperless system. I have set up a service report form that sends information to a table (service_reports) on a MySQL database (sewerman). That works fine. I can currently review a single record but I want to be able to review a record by a given date. So I need a double dropdown select menu where the first selection is of the treatment plant location (Plant_Name) and the second drop down would show dates of service (Date) for the Plant_Name selected in the first drop down menu. When a Date is selected, I would like that record to echo.

Here is my code:
plantfind.php >>> My very basic record lookup with the names hard coded. I would like this to be dynamic from MySQL.

<?php
$q=$_GET["q"];

$con = mysql_connect("00.00.000.000","sewerman","********");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("sewerman", $con);

$sql="SELECT * FROM service_reports WHERE Plant_Name = '".$q."'";

$result = mysql_query($sql);

while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<b>Compay Name:</b> ".$row['Company_Name'] .".<br />";
echo "<b>Date Of Service:</b> ".$row['Date'] .".<br />";
echo "<b>Plant Name:</b> ".$row['Plant_Name'] .".<br />";
echo "<b>Plant Address:</b> ".$row['Plant_Address'] .".<br />";
echo "<b>Plant City:</b> ".$row['Plant_City'] .".<br />";
echo "<b>Plant State:</b> ".$row['Plant_State'] .".<br />";
echo "<b>Plant Contact:</b> ".$row['Plant_Contact'] .".<br />";
echo "<b>Plant_Phone:</b> ".$row['Plant_Phone'] .".<br />";
echo "<b>Plant E-mail:</b> ".$row['Plant_Email'] .".<br />";
echo "<b>Bar Screen Condition:</b> ".$row['Bar_Screen_Condit'] .".<br />";
echo "<b>Bar Screen Description:</b> ".$row['Bar_Screen_Descrip'] .".<br />";
echo "<b>Aeration Color:</b> ".$row['Aer_Basin_Color'] .".<br />";
echo "<b>Aer Basin Description:</b> ".$row['Aer_Basin_Descrip'] .".<br />";
echo "<b>Aer Delivery Description:</b> ".$row['Aer_Delivery_Descrip'] .".<br />";
echo "<b>Sludge Return Rate:</b> ".$row['Sludge_Rate'] .".<br />";
echo "<b>Skimmer Setting:</b> ".$row['Skimmer_Setting'] .".<br />";
echo "<b>Skimmer Description:</b> ".$row['Skimmer_Descrip'] .".<br />";
echo "<b>Sludge In Cone (IN.):</b> ".$row['Sludge_In_Cone'] .".<br />";
echo "<b>Clarifier Surface:</b> ".$row['Clarifier_Surface'] .".<br />";
echo "<b>Clarifier Surface Description:</b> ".$row['Clarifier_Surf_Descrip'] .".<br />";
echo "<b>Clarifier Window Condition:</b> ".$row['Clarifier_Window'] .".<br />";
echo "<b>Clarifier Window Description:</b> ".$row['Clarifier_Win_Descrip'] .".<br />";
echo "<b>Clarifier Weir Condition:</b> ".$row['Clarifier_Weir'] .".<br />";
echo "<b>Clarifier Weir Description:</b> ".$row['Clarifier_Weir_Descrip'] .".<br />";
echo "<b>Contact Chamber Condition:</b> ".$row['Contact_Chamber'] .".<br />";
echo "<b>Contact Chamber Obstruction:</b> ".$row['Contact_Obstruct'] .".<br />";
echo "<b>Contact Chamber Obstruction Description:</b> ".$row['Contact_Obstruct_Descrip'] .".<br />";
echo "<b>Contact Chamber Integrity Description:</b> ".$row['Contact_Integrity_Descrip'] .".<br />";
echo "<b>Chlorinator Condition:</b> ".$row['Chlorinator_Condit'] .".<br />";
echo "<b>Chlorine Tube #1 Condition:</b> ".$row['Chlorine1_Condit'] .".<br />";
echo "<b>Chlorine Tube #2 Condition:</b> ".$row['Chlorine2_Condit'] .".<br />";
echo "<b>Chlorine Tube #3 Condition:</b> ".$row['Chlorine3_Condit'] .".<br />";
echo "<b>Chlorine Tube #4 Condition:</b> ".$row['Chlorine4_Condit'] .".<br />";
echo "<b>Chlotinator Description:</b> ".$row['Chlotinator_Descrip'] .".<br />";
echo "<b>Blower(s) Description:</b> ".$row['Blowers_Descrip'] .".<br />";
echo "<b>Filter Housing #1 Condition:</b> ".$row['Filter1_House_Condit'] .".<br />";
echo "<b>Filter Housing #2 Condition:</b> ".$row['Filter2_House_Condit'] .".<br />";
echo "<b>Filter Housing #1 Model:</b> ".$row['Filter1_House_Model'] .".<br />";
echo "<b>Filter Housing #2 Model:</b> ".$row['Filter2_House_Model'] .".<br />";
echo "<b>Filter Element #1 Condition:</b> ".$row['Filter1_Element_Condit'] .".<br />";
echo "<b>Filter Element #2 Condition:</b> ".$row['Filter2_Element_Condit'] .".<br />";
echo "<b>Filter Element #1 Changed:</b> ".$row['Filter1_Element_Change'] .".<br />";
echo "<b>Filter Element #2 Changed:</b> ".$row['Filter2_Element_Change'] .".<br />";
echo "<b>Filter Element #1 Model:</b> ".$row['Filter1_Element_Model'] .".<br />";
echo "<b>Filter Element #2 Model:</b> ".$row['Filter2_Element_Model'] .".<br />";
echo "<b>Pulley Wheel #1 Condition:</b> ".$row['Pulley1_Condit'] .".<br />";
echo "<b>Pulley Wheel #2 Condition:</b> ".$row['Pulley2_Condit'] .".<br />";
echo "<b>V-belt #1 Condition:</b> ".$row['Vbelt1_Condit'] .".<br />";
echo "<b>V-belt #2 Condition:</b> ".$row['Vbelt2_Condit'] .".<br />";
echo "<b>V-belt #1 Model:</b> ".$row['Vbelt1_Model'] .".<br />";
echo "<b>V-belt #2 Model:</b> ".$row['Vbelt2_Model'] .".<br />";
echo "<b>V-belt Description:</b> ".$row['Vbelt_Descrip'] .".<br />";
echo "<b>Motor Pulley #1 Condition:</b> ".$row['Motor_Pulley1_Condit'] .".<br />";
echo "<b>Motor Pulley #2 Condition:</b> ".$row['Motor_Pulley2_Condit'] .".<br />";
echo "<b>Motor Pulley Description:</b> ".$row['Motor_Pulley_Descrip'] .".<br />";
echo "<b>Motor Horse Power:</b> ".$row['Motor_HP'] .".<br />";
echo "<b>Motor Voltage:</b> ".$row['Motor_Volts'] .".<br />";
echo "<b>Motor Phase:</b> ".$row['Motor_Phase'] .".<br />";
echo "<b>Motor Condition:</b> ".$row['Motor_Condit'] .".<br />";
echo "<b>Motor #1 Amps:</b> ".$row['Motor1_Amps'] .".<br />";
echo "<b>Motor #2 Amps:</b> ".$row['Motor2_Amps'] .".<br />";
echo "<b>Control Panel Condition:</b> ".$row['Control_Condit'] .".<br />";
echo "<b>Audible Alarm Condtion:</b> ".$row['Audible_Alarm'] .".<br />";
echo "<b>Visual Alarm Condition:</b> ".$row['Visual_Alarm'] .".<br />";
echo "<b>Effluent Clarity:</b> ".$row['Effluent_Clarity'] .".<br />";
echo "<b>Effluent Odor:</b> ".$row['Effluent_Odor'] .".<br />";
echo "<b>Flow Rate:</b> ".$row['Flow_Rate'] .".<br />";
echo "<b>pH Measurement:</b> ".$row['pH_Measurement'] .".<br />";
echo "<b>Chlorine Residual:</b> ".$row['CL2_Residual'] .".<br />";
echo "<b>Effluent Notes:</b> ".$row['Effluent_Notes'] .".<br />";
echo "<b>Chlorine Bucket #:</b> ".$row['CL2_Bucket'] .".<br />";
echo "<b>Operator Performing Service:</b> ".$row['Service_Operator'] .".<br />";
echo "</tr>";
echo "</table>";
}
mysql_close($con);
?>

- - - - - - - - - - - - - - - - - - - - - - - - - - -
Here is my html form: plantfind.html Again, my menu is hard coded but needs to be dynamic from MySQL

<html>
<head>
<title>SEWERMAN, LLC Treatment Plant Service Report</title>

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

<style type="text/css">

/* General styles */
body { margin: 0; padding: 0; font: 80%/1.5 Arial,Helvetica,sans-serif; color: #111; background-color: #FFF; }
h2 { margin: 0px; padding: 10px; font-family: Georgia, "Times New Roman", Times, serif; font-size: 200%; font-weight: normal; color: #FFF; background-color: #111; border-bottom: #BBB 2px solid; }
p#copyright { margin: 20px 10px; font-size: 90%; color: #999; }

/* Form styles */
div.form-container { margin: 10px; padding: 5px; background-color: #FFF; border: #EEE 1px solid; }

p.legend { margin-bottom: 1em; }
p.legend em { color: #C00; font-style: normal; }

div.errors { margin: 0 0 10px 0; padding: 5px 10px; border: #FC6 1px solid; background-color: #FFC; }
div.errors p { margin: 0; }
div.errors p em { color: #C00; font-style: normal; font-weight: bold; }

div.form-container form p { margin: 0; }
div.form-container form p.note { margin-left: 170px; font-size: 90%; color: #333; }
div.form-container form fieldset { margin: 10px 0; padding: 10px; border: #DDD 1px solid; }
div.form-container form legend { font-weight: bold; color: #666; }
div.form-container form fieldset div { padding: 0.25em 0; }
div.form-container label,
div.form-container span.label { margin-right: 10px; padding-right: 10px; width: 150px; display: block; float: left; text-align: right; position: relative; }
div.form-container label.error,
div.form-container span.error { color: #C00; }
div.form-container label em,
div.form-container span.label em { position: absolute; right: 0; font-size: 120%; font-style: normal; color: #C00; }
div.form-container input.error { border-color: #C00; background-color: #FEF; }
div.form-container input:focus,
div.form-container input.error:focus,
div.form-container textarea:focus { background-color: #FFC; border-color: #FC6; }
div.form-container div.controlset label,
div.form-container div.controlset input { display: inline; float: none; }
div.form-container div.controlset div { margin-left: 170px; }
div.form-container div.buttonrow { margin-left: 180px; }

/* Table Styles */
table, th, td
{
border: 1px solid black;
}
table
{
border-collapse:collapse;
}
table,th, td
{
border: 1px solid black;
}
table
{
width:80%;
}
th
{
height:40px;
}
td
{
text-align:left;
}
td
{
height:40px;
vertical-align:bottom;
}
td
{
padding:10px;
}
table, td, th
{
border:1px solid green;
}
th
{
background-color:green;
color:white;
}


</style>

<script type="text/javascript">
function showUser(str)
{
if (str=="")
{
document.getElementById("txtHint").innerHTML="";
return;
}
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","plantfind.php?q="+str,true);
xmlhttp.send();
}
</script>
</head>
<body>
<div id="wrapper">

<h2><img src="/INSTALLERS/Sewerman/images/SM_logo.jpg" alt="SewerMan" /> Treatment Plant Service Report</h2>

<div class="form-container">

<p>Return to: <a href="allreports.html" title="SEWERMAN, LLC Reports Home">Service Reports Home</a>.</p>
<h3>Select your <b>parish</b> below:</h3>

<form>
<select name="users" onchange="showUser(this.value)">
<option value="">Select...</option>
<option value="Wisteria Heights MHP">Wisteria Heights MHP</option>
<option value="Country Manor MHP">Country Manor MHP</option>
<option value="X">X</option>
<option value="Y">Y</option>
<option value="Z">Z</option>
</select>
</form>
<br />
<tr>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f1; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f2; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f3; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f4; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f5; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f6; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f7; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f8; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f9; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f10; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f11; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f12; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f13; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f14; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f15; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f16; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f17; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f18; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f19; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f20; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f21; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f22; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f23; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f24; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f25; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f26; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f27; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f28; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f29; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f30; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f31; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f32; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f33; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f34; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f35; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f36; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f37; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f38; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f39; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f40; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f41; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f42; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f43; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f44; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f45; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f46; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f47; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f48; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f49; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f50; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f51; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f52; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f53; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f54; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f55; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f56; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f57; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f58; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f59; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f60; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f61; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f62; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f63; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f64; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f65; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f66; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f67; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f68; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f69; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f70; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f71; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f72; ?></font></td>
</tr>

<div id="txtHint"><a name="Installer Finder Results:"></a></div>
<div id="txtHint"><a name="Reset Selection"></a></div>




<?php
$i=0;
while ($i < $num) {

$f1=mysql_result($result,$i,"Company Name");
$f2=mysql_result($result,$i,"Company Name");
$f3=mysql_result($result,$i,"Plant Name");
$f4=mysql_result($result,$i,"Plant Address");
$f5=mysql_result($result,$i,"Plant City");
$f6=mysql_result($result,$i,"Plant State");
$f7=mysql_result($result,$i,"Plant Contact");
$f8=mysql_result($result,$i,"Plant Phone");
$f9=mysql_result($result,$i,"Plant Email");
$f10=mysql_result($result,$i,"Bar Screen Condition");
$f11=mysql_result($result,$i,"Bar Screen Description");
$f12=mysql_result($result,$i,"Aeration Color");
$f13=mysql_result($result,$i,"Aer Basin Descript.");
$f14=mysql_result($result,$i,"Aer Delivery Descript.");
$f15=mysql_result($result,$i,"Sludge Return Rate");
$f16=mysql_result($result,$i,"Skimmer Setting");
$f17=mysql_result($result,$i,"Skimmer Description");
$f18=mysql_result($result,$i,"Sludge In Cone");
$f19=mysql_result($result,$i,"Clarifier Surface");
$f20=mysql_result($result,$i,"Clarifier Surface Description");
$f21=mysql_result($result,$i,"Clarifier Window Condition");
$f22=mysql_result($result,$i,"Clarifier Window Description");
$f23=mysql_result($result,$i,"Clarifier Weir Condition");
$f24=mysql_result($result,$i,"Clarifier Weir Description");
$f25=mysql_result($result,$i,"Contact Chamber Condition");
$f26=mysql_result($result,$i,"Contact Chamber Obstruction");
$f27=mysql_result($result,$i,"Contact Chamber Obstruction Description");
$f28=mysql_result($result,$i,"Contact Chamber Integrity Description");
$f29=mysql_result($result,$i,"Chlorinator Condition");
$f30=mysql_result($result,$i,"Chlorine Tube #1 Condition");
$f31=mysql_result($result,$i,"Chlorine Tube #2 Condition");
$f32=mysql_result($result,$i,"Chlorine Tube #3 Condition");
$f33=mysql_result($result,$i,"Chlorine Tube #4 Condition");
$f34=mysql_result($result,$i,"Chlotinator Description");
$f35=mysql_result($result,$i,"Blower(s) Description");
$f36=mysql_result($result,$i,"Filter Housing #1 Condition");
$f37=mysql_result($result,$i,"Filter Housing #2 Condition");
$f38=mysql_result($result,$i,"Filter Housing #1 Model");
$f39=mysql_result($result,$i,"Filter Housing #2 Model");
$f40=mysql_result($result,$i,"Filter Element #1 Condition");
$f41=mysql_result($result,$i,"Filter Element #2 Condition");
$f42=mysql_result($result,$i,"Filter Element #1 Changed");
$f43=mysql_result($result,$i,"Filter Element #2 Changed");
$f44=mysql_result($result,$i,"Filter Element #1 Model");
$f45=mysql_result($result,$i,"Filter Element #2 Model");
$f46=mysql_result($result,$i,"Pulley Wheel #1 Condition");
$f47=mysql_result($result,$i,"Pulley Wheel #2 Condition");
$f48=mysql_result($result,$i,"V-belt #1 Condition");
$f49=mysql_result($result,$i,"V-belt #2 Condition");
$f50=mysql_result($result,$i,"V-belt #1 Model");
$f51=mysql_result($result,$i,"V-belt #2 Model");
$f52=mysql_result($result,$i,"V-belt Description");
$f53=mysql_result($result,$i,"Motor Pulley #1 Condition");
$f54=mysql_result($result,$i,"Motor Pulley #2 Condition");
$f55=mysql_result($result,$i,"Motor Pulley Description");
$f56=mysql_result($result,$i,"Motor Horse Power");
$f57=mysql_result($result,$i,"Motor Voltage");
$f58=mysql_result($result,$i,"Motor Phase");
$f59=mysql_result($result,$i,"Motor Condition");
$f60=mysql_result($result,$i,"Motor #1 Amps");
$f61=mysql_result($result,$i,"Motor #2 Amps");
$f62=mysql_result($result,$i,"Control Panel Condition");
$f63=mysql_result($result,$i,"Audible Alarm Condtion");
$f64=mysql_result($result,$i,"Visual Alarm Condition");
$f65=mysql_result($result,$i,"Effluent Clarity");
$f66=mysql_result($result,$i,"Effluent Odor");
$f67=mysql_result($result,$i,"Flow Rate");
$f68=mysql_result($result,$i,"pH Measurement");
$f69=mysql_result($result,$i,"Chlorine Residual");
$f70=mysql_result($result,$i,"Effluent Notes");
$f69=mysql_result($result,$i,"Chlorine Bucket #");
$f70=mysql_result($result,$i,"Operator Performing Service");
?>

<tr>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f1; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f2; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f3; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f4; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f5; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f6; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f7; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f8; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f9; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f10; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f11; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f12; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f13; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f14; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f15; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f16; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f17; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f18; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f19; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f20; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f21; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f22; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f23; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f24; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f25; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f26; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f27; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f28; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f29; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f30; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f31; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f32; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f33; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f34; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f35; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f36; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f37; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f38; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f39; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f40; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f41; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f42; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f43; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f44; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f45; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f46; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f47; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f48; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f49; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f50; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f51; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f52; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f53; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f54; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f55; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f56; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f57; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f58; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f59; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f60; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f61; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f62; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f63; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f64; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f65; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f66; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f67; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f68; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f69; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f70; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f71; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f72; ?></font></td>
</tr>

<?php
$i++;
}
?>
</body>
</html>

- - - - - - - - - - - - - - - - - - -

I thank you in advance for any help or direction you can provide. I am PHP ignorant and bow to your superior knowledge. The Double Drop Down example on this site is great but I don't know how to swithc from looking up number to looking up Plant_Name and Date.

Thanks again,
Shane
cabalsdemon
06:09:12 12:41
are you trying to get all results or would you like to pick a result from a drobdown
Please Login to post your reply or start a new topic
Privacy Policy | Disclaimer
©2000 - 2014 plus2net.com All rights reserved worldwide