I was able to populate a dropdown question html form with results from my database. However, the item I am choosing is a name, and although both the first and last name show up in the menu option, when it is submitted, only the first name is showing up.
$sql = "SELECT DISTINCT name FROM communications";
$result = mysql_query($sql);
echo "<select name='client1'>";
while($row = mysql_fetch_array($result)) {
echo "<option value=".$row['name'].">";
echo $row['name'];
echo "</option>";}
echo "</select>";?>
<input type="submit" name= "submit2" value="Show">
<input type="hidden" name= "submit3" value="Submit">
</form>
<?php
if(isset($_POST['submit3']))
{ echo $_POST['client1']; }
client1 is only echoing out the first name, not the second. Can't figure out why.