Hi again, 

Sorry for the trouble - I'm totally confused.

All I'm wanting to do is post the info from the select drop down into
a MYSQL database.

I'll post below the HTML form with the PHP and then beneath that I'll
add the HTML output - hopefully this might help to solve the issue.

---------------------
HTML FORM & PHP CODE
---------------------

<form action='<? echo $_SERVER['PHP_SELF']; ?>' method='post'> 
<?
echo "Picture name <input type='text' name='picname' size='40'
maxlength='40' value='$picname' /><br />
<select name='piccountry'>  \n";

while ($row = mysql_fetch_array($result1))
        {
        extract($row);
        echo "<option value='$piccountry'>$piccountry</option> \n";
        }
echo "</select><br /> \n";
echo "<input type='submit' value='&gt;' /> \n";
echo "</form> \n";


$piccountry = $_POST['piccountry'];

      $query3 = "INSERT INTO picture (picname, piccountry) VALUES
('$picname', '$piccountry')";

      $result3 = mysql_query($query3)

      or die ("Couldn't execute query3.");

----------
HTML OUTPUT
------------

<form action='' method='post'> 
<input type='hidden' name='act' value='submit' /> 
Picture name <input type='text' name='picname' size='40'
maxlength='40' value='zxczxczxc' /><br />
<select name='piccountry'>  
<option value='Cuba'>Cuba</option> 
<option value='England'>England</option> 
<option value='France'>France</option> 
<option value='Nepal'>Nepal</option> 
<option value='Netherlands'>Netherlands</option> 
<option value='Spain'>Spain</option> 
<option value='Switzerland'>Switzerland</option> 
</select><br /> 
<input type='submit' value='&gt;' /> 
</form> 

Thanks again,
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