I am working of a musicians volunteer DB. I have a ADD Volunteer page:

<?php
	require_once('auth.php');
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Village Of Hope Worship</title>
<style type="text/css">
<!--
.style1 {
	font-size: 24px;
	font-weight: bold;
}
.style3 {
	font-size: 12px;
	font-weight: bold;
	font-style: italic;
}
.style5 {
	font-size: 10px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	color: #0000FF;
}
-->
</style>
</head>

<body>
  <table width="505" border="0" align="center" cellpadding="2" cellspacing="2">
    <tr align="center" valign="middle">
      <td height="42" colspan="2"><div align="center" class="style1">New Volunteer Entry
      </div></td>
    </tr>
    <tr>
      <td width="348"><span class="style3"><a href="volunteers_list.php">Back to LIST</a> </span></td>
      <td width="143" align="center" valign="middle"><div align="center">
        <form id="form1" name="form1" method="post" action="volunteers_list_add.php">
            <input type="reset" name="Reset" value="Reset" />
            <input name="Submit" type="submit" id="Submit" value="SAVE" />
      
      </div></td>
    </tr>
</table>
  <br />
  <table width="504" border="0" align="center" cellpadding="2" cellspacing="2">
    <tr>
      <td width="91"><div align="right">
        
          <label>First Name: </label>
        
        </div></td>
      <td colspan="2"><input name="First_Name" type="text" id="First_Name" maxlength="25" /></td>
    </tr>
    <tr>
      <td><div align="right">
        <label>Last Name:</label>
        </div></td>
      <td colspan="2"><input name="Last_Name" type="text" id="Last_Name" size="42" maxlength="35" /></td>
    </tr>
    <tr>
      <td><div align="right">
        <label>Email:</label>
        
        </div></td>
      <td colspan="2"><input name="Email" type="text" id="Email" size="42" maxlength="60" /></td>
    </tr>
    <tr>
      <td><div align="right">
        
          <label>Contact Phone:</label>
        
        </div></td>
      <td colspan="2"><input name="Contact_Phone" type="text" id="Contact_Phone" maxlength="20" /></td>
    </tr>
    <tr>
      <td><div align="right">
        
          <label>Address:</label>
        
        </div></td>
      <td colspan="2"><input name="Address" type="text" id="Address" size="42" maxlength="60" /></td>
    </tr>
    <tr>
      <td><div align="right">
        
          <label>City/St/Zip:</label>
        
        </div></td>
      <td colspan="2"><input name="City" type="text" id="City" maxlength="30" />
        &nbsp;
        <input name="State" type="text" id="State" size="3" maxlength="2" />
        
         &nbsp;
        <input name="Zip" type="text" id="Zip" size="12" maxlength="10" /></td>
    </tr>
    <tr>
      <td>	<div align="right">
        		<label>Username:</label>
       		</div></td>
      <td colspan="2"><input name="Username" type="text" id="Username" maxlength="20" /></td>
    </tr>
    <tr>
      <td><div align="right">Password:</div></td>
      <td colspan="2"><input name="Password" type="text" id="Password" maxlength="20" /></td>
    </tr>
	    <tr>
      <td><div align="right">ADMIN:</div></td>
      <td colspan="2"><input name="ADMIN" type="text" id="ADMIN" maxlength="2" /></td>
    </tr>
    <tr>
      <td><div align="right">Instruments:</div></td>
      <td width="116" align="center" valign="middle">
        <div align="left">
          <select name="Instrument" size="5" multiple="multiple" id="Instrument">
            <option>Select from the list below...</option>
            <option value="Leader">Leader</option>
            <option value="Singer">Singer</option>
            <option value="Piano">Piano</option>
            <option value="Synth">Synth</option>
            <option value="Acoustic Guitar">Acoustic Guitar</option>
            <option value="Electric Guitar">Electric Guitar</option>
            <option value="Bass Guitar">Bass Guitar</option>
            <option value="Drums">Drums</option>
            <option value="Percussion">Percussion</option>
            <option value="Sax/Horn">Sax/Horn</option>
            <option value="Flute">Flute</option>
          </select>
        </div></td>
      <td width="277" align="center" valign="middle"><div align="left"><span class="style5">To select multiple, hold down your <br />
      Command Key (MAC) or ALT (PC)</span></div></td>
    </tr>
    <tr>
      <td><div align="right">Special Notes: </div></td>
      <td colspan="2"><textarea name="Notes" cols="40" rows="4" id="Notes"></textarea></td>
    </tr>
</table>  
  </form>
</body>
</html>

Then I target a page that does the ADD:

<?php
// -- Add a record -- 
ServerConnect();
DB_Connect();

// Get values from form.
$First_Name=$_POST['First_Name'];
$Last_Name=$_POST['Last_Name'];
$Email=$_POST['Email']; 
$Contact_Phone=$_POST['Contact_Phone'];
$Address=$_POST['Address'];
$City=$_POST['City']; 
$State=$_POST['State'];
$Zip=$_POST['Zip'];
$Username=$_POST['Username']; 
$Password=$_POST['Password']; 
$ADMIN=$_POST['ADMIN'];
$Instrument=$_POST['Instrument'];
$Notes=$_POST['Notes']; 

$sql="INSERT INTO Volunteers (First_Name, Last_Name, Email, Contact_Phone, Address, City, State, Zip, Username, Password, ADMIN, Instrument, Notes) VALUES ('$First_Name','$Last_Name','$Email','$Contact_Phone','$Address','$City','$State','$Zip','$Username','$Password','$ADMIN','$Instrument','$Notes')";
$result = mysql_query($sql) or die(mysql_error());
echo "<span class=\"style2\">Volunteer Added...</span>";
?>

I, also, have a EDIT Volunteer page:

<?php
	require_once('auth.php');
?>
<? 
include("inc/interface.php");
include("inc/funct.php");
?>

<?php
// -- Add a record -- 
ServerConnect();
DB_Connect();

$id=$_GET['id'];

$result=mysql_query("select * from Volunteers where id='$id'");

$row=mysql_fetch_assoc($result);

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Village Of Hope Worship</title>
<style type="text/css">
<!--
.style1 {
	font-size: 24px;
	font-weight: bold;
}
.style3 {
	font-size: 12px;
	font-weight: bold;
	font-style: italic;
}
.style5 {
	font-size: 10px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	color: #0000FF;
}
-->
</style>
</head>

<body>
  <table width="505" border="0" align="center" cellpadding="2" cellspacing="2">
    <tr align="center" valign="middle">
      <td height="42" colspan="2"><div align="center" class="style1">Edit Volunteer Entry
      </div></td>
    </tr>
    <tr>
      <td width="348"><span class="style3"><a href="volunteers_list.php">Back to LIST</a> </span></td>
      <td width="143" align="center" valign="middle"><div align="center">
        <form id="form1" name="form1" method="post" action="volunteers_list_update.php">
            <input type="reset" name="Reset" value="Reset" />
            <input name="Submit" type="submit" id="Submit" value="SAVE" />
      
      </div></td>
    </tr>
	<input type="hidden" name="id" value="<? echo $row['id']; ?>">
</table>
  <br />
  <table width="504" border="0" align="center" cellpadding="2" cellspacing="2">
    <tr>
      <td width="91"><div align="right">
        
          <label>First Name: </label>
        
        </div></td>
      <td colspan="2"><input name="First_Name" type="text" id="First_Name" value="<? echo $row['First_Name']; ?>" maxlength="25" /></td>
    </tr>
    <tr>
      <td><div align="right">
        <label>Last Name:</label>
        </div></td>
      <td colspan="2"><input name="Last_Name" type="text" id="Last_Name" size="42" value="<? echo $row['Last_Name']; ?>" maxlength="35" /></td>
    </tr>
    <tr>
      <td><div align="right">
        <label>Email:</label>
        
        </div></td>
      <td colspan="2"><input name="Email" type="text" id="Email" size="42" value="<? echo $row['Email']; ?>" maxlength="60" /></td>
    </tr>
    <tr>
      <td><div align="right">
        
          <label>Contact Phone:</label>
        
        </div></td>
      <td colspan="2"><input name="Contact_Phone" type="text" id="Contact_Phone"value="<? echo $row['Contact_Phone']; ?>"  maxlength="20" /></td>
    </tr>
    <tr>
      <td><div align="right">
        
          <label>Address:</label>
        
        </div></td>
      <td colspan="2"><input name="Address" type="text" id="Address" value="<? echo $row['Address']; ?>"  size="42" maxlength="60" /></td>
    </tr>
    <tr>
      <td><div align="right">
        
          <label>City/St/Zip:</label>
        
        </div></td>
      <td colspan="2"><input name="City" type="text" id="City" value="<? echo $row['City']; ?>" maxlength="30" />
        &nbsp;
        <input name="State" type="text" id="State" size="3" value="<? echo $row['State']; ?>" maxlength="2" />
        
         &nbsp;
        <input name="Zip" type="text" id="Zip" size="12" value="<? echo $row['Zip']; ?>" maxlength="10" /></td>
    </tr>
    <tr>
      <td>	<div align="right">
        		<label>Username:</label>
       		</div></td>
      <td colspan="2"><input name="Username" type="text" id="Username" value="<? echo $row['Username']; ?>" maxlength="20" /></td>
    </tr>
    <tr>
      <td><div align="right">Password:</div></td>
      <td colspan="2"><input name="Password" type="text" id="Password" value="<? echo $row['Password']; ?>" maxlength="20" /></td>
    </tr>
	    <tr>
      <td><div align="right">ADMIN:</div></td>
      <td colspan="2"><input name="ADMIN" type="text" id="ADMIN" value="<? echo $row['ADMIN']; ?>" maxlength="2" /></td>
    </tr>
    <tr>
      <td><div align="right">Instruments:</div></td>
      <td width="116" align="center" valign="middle">
        <div align="left">
          <select name="Instrument" size="5" multiple="multiple" id="Instrument">
            <option>Select from the list below...</option>
            <option value="Leader">Leader</option>
            <option value="Singer">Singer</option>
            <option value="Piano">Piano</option>
            <option value="Synth">Synth</option>
            <option value="Acoustic Guitar">Acoustic Guitar</option>
            <option value="Electric Guitar">Electric Guitar</option>
            <option value="Bass Guitar">Bass Guitar</option>
            <option value="Drums">Drums</option>
            <option value="Percussion">Percussion</option>
            <option value="Sax/Horn">Sax/Horn</option>
            <option value="Flute">Flute</option>
          </select>
        </div></td>
      <td width="277" align="center" valign="middle"><div align="left"><span class="style5">To select multiple, hold down your <br />
      Command Key (MAC) or ALT (PC)</span></div></td>
    </tr>
    <tr>
      <td><div align="right">Special Notes: </div></td>
      <td colspan="2"><textarea name="Notes" cols="40" rows="4" id="Notes" value="<? echo $row['Notes']; ?>" ></textarea></td>
    </tr>
</table>  
  </form>
</body>
</html>

Then I target a page that does the UPDATE:

<?php
// -- Update a record -- 
ServerConnect();
DB_Connect();

// Get values from form.
$id=$_POST['id'];
$First_Name=$_POST['First_Name'];
$Last_Name=$_POST['Last_Name'];
$Email=$_POST['Email']; 
$Contact_Phone=$_POST['Contact_Phone'];
$Address=$_POST['Address'];
$City=$_POST['City']; 
$State=$_POST['State'];
$Zip=$_POST['Zip'];
$Username=$_POST['Username']; 
$Password=$_POST['Password']; 
$ADMIN=$_POST['ADMIN'];
$Instrument=$_POST['Instrument'];
$Notes=$_POST['Notes'];


$sql="UPDATE Volunteers SET First_Name='$First_Name', Last_Name='$Last_Name', Email='$Email', Contact_Phone='$Contact_Phone', Address='$Address', City='$City', State='$State', Zip='$Zip', Username='$Username', Password='$Password', ADMIN='$ADMIN', Instrument='$Instrument', Notes='$Notes' WHERE id='$id'";
//echo "$sql";
$result = mysql_query($sql) or die(mysql_error());
echo "<span class=\"style2\">Volunteer Updated...</span>";
?>

Three issues I need help to resolve:

1) When I select more then one choice from my Instrument field, then select the ADD button, the multiple selections do not carry over to my mySQL table record. Only one value does. The field is a varchar type with plenty of characters allowed.

2) Once I get the data into my DB properly, I need to then be able to have it display properly when I retrieve it on my Update Volunteer Entry page.

3) Eventually, I will establish a Performance Date table in which I will assign Volunteers to performances. When I add a Volunteer:

IF they have multiple instruments they play, I would to provide the user a menu of choices for the field, based of the field Volunteer::Instrument
ELSE
Display it this way: Instrument - Piano
END IF

On a personal note, this is a online DB I am working on for the local Rescue Mission (Homeless Shelter Program). This is my first PHP/mySQL project, so I got much to learn. But once I see how things are done, I catch on pretty quickly.

If there is anyone who would like to volunteer their services to assist me in finishing this project for them, I could make sure you get a Letter of Donated Services from the the Non-Profit organization(tax right off). Just give me a PRIVATE message, if you are willing to help.

Thanks and I appreciate any help that can be offered.

Recommended Answers

All 6 Replies

You need to change the name of the instrument select element to "Instrument[]". Then when adding to the database run implode(',',$Instrument); because it will return an array of selected elements. Implode will put them into a comma separated string so it can be put into the database.

On the update page you will need to put the instruments into an array and loop through them checking if they are selected (You should also do this for the add page as it will help keep the data uniform and prevent errors).
ex.

$selected = explode(',',$Instruments); //instrument data from database
$instruments = array('Leader','Singer','Piano');
$options = '';
foreach( $instruments as $inst ) {
  $sel = '';
  if ( in_array( $inst,$selected ) ) {
    $sel = 'selected="selected" ';
  }
  $options .= "<option {$sel}value=\"{$inst}\"></option>\n";
}

and then echo $options where the options for the select should be in the update form.

Make sure you sanitize your input by adding field validation and using mysql_real_escape_string to prevent sql injection.

You need to change the name of the instrument select element to "Instrument[]". Then when adding to the database run implode(',',$Instrument); because it will return an array of selected elements. Implode will put them into a comma separated string so it can be put into the database.

On the update page you will need to put the instruments into an array and loop through them checking if they are selected (You should also do this for the add page as it will help keep the data uniform and prevent errors).
ex.

$selected = explode(',',$Instruments); //instrument data from database
$instruments = array('Leader','Singer','Piano');
$options = '';
foreach( $instruments as $inst ) {
  $sel = '';
  if ( in_array( $inst,$selected ) ) {
    $sel = 'selected="selected" ';
  }
  $options .= "<option {$sel}value=\"{$inst}\"></option>\n";
}

and then echo $options where the options for the select should be in the update form.

Make sure you sanitize your input by adding field validation and using mysql_real_escape_string to prevent sql injection.

Sorry. I am struggling with this. Base of the code I provided in the original post. Will you please modify it where the changes are needed. I can't seem to get the order right. I am sure once I see it, it will all make sense and I'll learn from it.

I really appreciate it.

This is the add page. It submits to itself now since there is no reason to have another page process it.

Put this code on one page:

<?php

include 'auth.php';

ServerConnect();
DB_Connect();

$result = '';
$error = array();

if ( isset( $_POST['submit'] ) ) {
	foreach( $_POST as $key => $value ) {
		${$key} = ( is_array( $value ) ? array_map( 'mysql_real_escape_string',$value ) : mysql_real_escape_string( $value ) );
	}
	if ( empty( $First_Name ) ) {
		$error[] = "First Name is empty";
	}
	//ect. need to add more validation for each field. search google and you will find many resources to help with form validation
	if ( count( $error ) == 0 ) {
		$Instrument = implode( ',',$Instrument );
		mysql_query("INSERT INTO Volunteers (First_Name, Last_Name, Email, Contact_Phone, Address, City, State, Zip, Username, Password, ADMIN, Instrument, Notes) VALUES ('{$First_Name}','{$Last_Name}','{$Email}','{$Contact_Phone}','{$Address}','{$City}','{$State}','{$Zip}','{$Username}','{$Password}','{$ADMIN}','{$Instrument}','{$Notes}')") or die('Error: ' . mysql_error());
		$result = "<span class=\"style2\">Volunteer Added...</span>";
	}
}

$errstr = '';
if ( count( $error ) > 0 ) {
	$errstr = "<div id=\"error\">\n\t<ul>\n";
	foreach( $error as $err ) {
		$errstr .= "\t\t<li>{$err}</li>\n";
	}
	$errstr .= "\t</ul>\n</div>";
}

echo <<<HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Village Of Hope Worship</title>
<style type="text/css">
<!--
.style1 {
	font-size: 24px;
	font-weight: bold;
}
.style3 {
	font-size: 12px;
	font-weight: bold;
	font-style: italic;
}
.style5 {
	font-size: 10px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	color: #0000FF;
}
-->
</style>
</head>
<body>
  <table width="505" border="0" align="center" cellpadding="2" cellspacing="2">
    <tr align="center" valign="middle">
      <td height="42" colspan="2"><div align="center" class="style1">New Volunteer Entry
      </div></td>
    </tr>
    <tr>
      <td width="348"><span class="style3"><a href="volunteers_list.php">Back to LIST</a> </span></td>
      <td width="143" align="center" valign="middle"><div align="center">
        <form id="form1" name="form1" method="post" action="{$_SERVER['PHP_SELF']}">
            <input type="reset" name="Reset" value="Reset" />
            <input name="submit" type="submit" id="Submit" value="SAVE" />
      
      </div></td>
    </tr>
</table>
  <br />
  {$errstr}
  <table width="504" border="0" align="center" cellpadding="2" cellspacing="2">
    <tr>
      <td width="91"><div align="right">
        
          <label>First Name: </label>
        
        </div></td>
      <td colspan="2"><input name="First_Name" type="text" id="First_Name" maxlength="25" /></td>
    </tr>
    <tr>
      <td><div align="right">
        <label>Last Name:</label>
        </div></td>
      <td colspan="2"><input name="Last_Name" type="text" id="Last_Name" size="42" maxlength="35" /></td>
    </tr>
    <tr>
      <td><div align="right">
        <label>Email:</label>
        
        </div></td>
      <td colspan="2"><input name="Email" type="text" id="Email" size="42" maxlength="60" /></td>
    </tr>
    <tr>
      <td><div align="right">
        
          <label>Contact Phone:</label>
        
        </div></td>
      <td colspan="2"><input name="Contact_Phone" type="text" id="Contact_Phone" maxlength="20" /></td>
    </tr>
    <tr>
      <td><div align="right">
        
          <label>Address:</label>
        
        </div></td>
      <td colspan="2"><input name="Address" type="text" id="Address" size="42" maxlength="60" /></td>
    </tr>
    <tr>
      <td><div align="right">
        
          <label>City/St/Zip:</label>
        
        </div></td>
      <td colspan="2"><input name="City" type="text" id="City" maxlength="30" />
        &nbsp;
        <input name="State" type="text" id="State" size="3" maxlength="2" />
        
         &nbsp;
        <input name="Zip" type="text" id="Zip" size="12" maxlength="10" /></td>
    </tr>
    <tr>
      <td>	<div align="right">
        		<label>Username:</label>
       		</div></td>
      <td colspan="2"><input name="Username" type="text" id="Username" maxlength="20" /></td>
    </tr>
    <tr>
      <td><div align="right">Password:</div></td>
      <td colspan="2"><input name="Password" type="text" id="Password" maxlength="20" /></td>
    </tr>
	    <tr>
      <td><div align="right">ADMIN:</div></td>
      <td colspan="2"><input name="ADMIN" type="text" id="ADMIN" maxlength="2" /></td>
    </tr>
    <tr>
      <td><div align="right">Instruments:</div></td>
      <td width="116" align="center" valign="middle">
        <div align="left">
          <select name="Instrument[]" size="5" multiple="multiple" id="Instrument">
            <option>Select from the list below...</option>
            <option value="Leader">Leader</option>
            <option value="Singer">Singer</option>
            <option value="Piano">Piano</option>
            <option value="Synth">Synth</option>
            <option value="Acoustic Guitar">Acoustic Guitar</option>
            <option value="Electric Guitar">Electric Guitar</option>
            <option value="Bass Guitar">Bass Guitar</option>
            <option value="Drums">Drums</option>
            <option value="Percussion">Percussion</option>
            <option value="Sax/Horn">Sax/Horn</option>
            <option value="Flute">Flute</option>
          </select>
        </div></td>
      <td width="277" align="center" valign="middle"><div align="left"><span class="style5">To select multiple, hold down your <br />Command Key (MAC) or ALT (PC)</span></div></td>
    </tr>
    <tr>
      <td><div align="right">Special Notes: </div></td>
      <td colspan="2"><textarea name="Notes" cols="40" rows="4" id="Notes"></textarea></td>
    </tr>
</table>  
  </form>
  {$result}
</body>
</html>
HTML;

?>

You can change where the errors and result go. You need to add validation to the forms.

I am working on the edit page.

You need to change the name of the instrument select element to "Instrument[]". Then when adding to the database run implode(',',$Instrument); because it will return an array of selected elements. Implode will put them into a comma separated string so it can be put into the database.

On the update page you will need to put the instruments into an array and loop through them checking if they are selected (You should also do this for the add page as it will help keep the data uniform and prevent errors).
ex.

$selected = explode(',',$Instruments); //instrument data from database
$instruments = array('Leader','Singer','Piano');
$options = '';
foreach( $instruments as $inst ) {
  $sel = '';
  if ( in_array( $inst,$selected ) ) {
    $sel = 'selected="selected" ';
  }
  $options .= "<option {$sel}value=\"{$inst}\"></option>\n";
}

and then echo $options where the options for the select should be in the update form.

Make sure you sanitize your input by adding field validation and using mysql_real_escape_string to prevent sql injection.

OK I am doing this and now it does not display ANYTHING in my Instrument List:

<?php
// -- Edit record -- 
ServerConnect();
DB_Connect();

$id=$_GET['id'];

$result=mysql_query("select * from Volunteers where id='$id'");

$row=mysql_fetch_assoc($result);

$Instruments1 = $row['Instrument'];

$selected = explode(',',$Instruments1); //instrument data from database
$instruments = array('Select from the list below...','Leader','Singer','Piano','Synth','Acoustic Guitar','Electric Guitar','Bass Guitar','Drums','Percussion','Sax/Flute','Flute');
$options = '';
foreach( $instruments as $inst ) {
  $sel = '';
  if ( in_array( $inst,$selected ) ) {
    $sel = 'selected="selected" ';
  }
  $options .= "<option {$sel}value=\"{$inst}\"></option>\n";
}
?>

And my HTML is formatted like this:

<tr>
      <td><div align="right">Instruments:</div></td>
      <td width="116" align="center" valign="middle">
        <div align="left">
          <select name="Instrument[]" size="5" multiple="multiple" id="Instrument">
            
<? echo $options; 
	    //<option>Select from the list below...</option>
            //<option value="Leader">Leader</option>
            //<option value="Singer">Singer</option>
            //<option value="Piano">Piano</option>
            //<option value="Synth">Synth</option>
            //<option value="Acoustic Guitar">Acoustic Guitar</option>
            //<option value="Electric Guitar">Electric Guitar</option>
            //<option value="Bass Guitar">Bass Guitar</option>
            //<option value="Drums">Drums</option>
            //<option value="Percussion">Percussion</option>
            //<option value="Sax/Horn">Sax/Horn</option>
            //<option value="Flute">Flute</option>
           ?>
          </select>
        </div></td>
      <td width="277" align="center" valign="middle"><div align="left"><span class="style5">To select multiple, hold down your <br />
      Command Key (MAC) or ALT (PC)</span></div></td>
    </tr>
    <tr>
      <td><div align="right">Special Notes: </div></td>
      <td colspan="2"><textarea name="Notes" cols="40" rows="4" id="Notes" value="<? echo $row['Notes']; ?>" ></textarea></td>
    </tr>
</table>  
  </form>
</body>
</html>

Hopefully it something simple in the HTML or PHP.

It's weird though... It shows a List (displayed very narrow) with the correct rows highlighted but NO VALUES ???

Thanks!!!

It is my fault. I get to typing and miss simple stuff.
Change:

$options .= "<option {$sel}value=\"{$inst}\"></option>\n";

to

$options .= "<option {$sel}value=\"{$inst}\">{$inst}</option>\n";

It is my fault. I get to typing and miss simple stuff.
Change:

$options .= "<option {$sel}value=\"{$inst}\"></option>\n";

to

$options .= "<option {$sel}value=\"{$inst}\">{$inst}</option>\n";

GREAT! It's all working now.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.