[Solved] Passing a value from Dynamic Select
Posted: Thu Aug 18, 2005 3:30 pm
I’m looking for some help with this. If I want to insert a value from a form field I use
But I don’t know how to pass the same value from a dynamically created select box such as this and in effect replace GetSQLValueString($_POST['property'], "text"), .
If anybody can give me some idea how this is done I’d be most grateful.
Thanks a mil
B
Code: Select all
$insertSQL = sprintf("INSERT INTO enquiries (property) VALUES (%s)",
GetSQLValueString($_POST['property'], "text"),Code: Select all
<?PHP echo "<select name='Property' id='Property'>\n
<option value=\"'%'\">Select</option>";
while($dbRow = mysql_fetch_array($GetProperty)){
echo "<option value='"
. $dbRow["properties_idpk"]
. "'>"
. $dbRow["name"]
."</option>\n";
} echo "</select>\n";
?>Thanks a mil
B