aceconcepts wrote:Can you just post you form or just event the select element?
OK I have reduced the code to a minimum:
Here is the php code--
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>TestSelects.php</title>
</head>
<body>
<P></P>
Test selects to post
<p></p>
<form name="editform" action="testajaxpost.php" method="post">
Record ID:<input name='record_id' value=100 size='4' readonly='Yes'>
<span>Type:</span>
<?php
$type ="B";
echo '<select class="input" name "type" size = "1">';
if($type== 'P'){
echo '<option value="P" selected>Personal</option>';
} else {
echo '<option value="P" >Personal</option>';
};
if($type== 'K'){
echo '<option value="K" selected>Mary Kay</option>';
} else {
echo '<option value="K" >Mary Kay</option>';
};
if($type== 'B'){
echo '<option value="B" selected>Yellow Pages</option>';
} else {
echo '<option value="B" >Yellow Pages</option>';
};
echo "</select>";
?>
<span >Lunch:</span>
<select name 'Lunch' size = '1'>
<option value="Yes" selected>Yes</option>
<option value="No" >No</option>
</select>
<br>
<input type='Submit'>
</form>
</body>
</html>
=======================================
Here are the results of the print_r:
array
'record_id' => string '100' (length=3)
Array ( [record_id] => 100 )
=========================================
Here the results of the code when written in ColdFusion:
array
'record_id' => string '100' (length=3)
'type' => string 'B' (length=1)
'lunch' => string 'Y' (length=1)
Array ( [record_id] => 100 [type] => B [will] => Y )