Hi,

Just wondering if you could help me out with a problem I can't seem to
solve. I have a MYSQL/PHP photo gallery website which I'm currently
developing.

In order to add records I've created a page with an HTML form which
inserts records into the MYSQL database. I've had no problems
inserting data from text <INPUT> type fields. However, when I come to
add data from a <SELECT> drop down box, it isn't working. For some
reason - & regardless of the option picked when you submit the form -
the data entered is always the last value in the list. 

Has anyone any ideas? Grateful for any tips/solutions. The relevent
code is below:

<?PHP
$query1 = "SELECT DISTINCT picplace FROM pictureplace ORDER BY picplace";
$result1 = mysql_query($query1)
or die ("Couldn't execute query1.");
?>

<form action='<?$PHP_SELF?>' method='post'>
<select name='picplace'>
<?

while ($row = mysql_fetch_array($result1))
     {
    extract($row);
    echo "<option value='$picplace'>$picplace \n";
    

    }
    echo "</select> \n";
?>

<br />
<input type='submit' value='&gt;' />
</form>

Thanks,
Chris






The PHP_mySQL group is dedicated to learn more about the PHP_mySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to