Need help with a drop-down list on regular php code (not on scriptcase).
I was given a project to change a php program that will have a telephone field with a “click to dial” functionality.
Since I don’t know how to do this in Scriptcase, and I have to have a system with available telephones to dial out, I decided to just change the regular php program but I am stuck changing the old drop-downs.
The old system only uses the values from a plain hard-coded list or a source table and stores the same values on a target table which is where we insert or update school records.
As an example: the school_name is in a drop down list and works fine but I in the new system I need to do the following: [LIST=1]
if ($result) {
echo “<option>".$row[‘school_name’]."</option>”;
while($row = $result->fetch_assoc()) {
echo “<option>".$row[‘school_name’]."</option>”;
}
echo “</select></td></tr>”;
}
In the picture below I can see the schools from the select statement but they are outside of the drop-down list which is ?SCHOOLS:? the line in red above, I believe I am missing the way to code for <option </option>???
Well I can’t upload a pic or an attachment, who knows but the fields com up on the page like this:
NAME - - > INPUT BOX FOR NAME
LAST NAME – > INPUT BOX FOR LAST NAME
TELEPHONE - - > INPUT BOX FOR TELEPHONE
SCHOOL – > INPUT BOX FOR SCHOOL NAME (this is where I expect the selected value to show up but I select it then goes blanks)
After the school field I see the list of schools but these are all outside of the drop-down list like another web element.
Any ideas how I can make the results fields from the associative arrey behave like a drop-down list would be great.
Thank you…