Gnarley drop-down db problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a user maintenance script. In the address maintenance page there is a drop down for the country entry. First, I retrieve the address info from a MySQL table. Globals are off, so I initialize the variables in the input with $country=$_GET['country']. In the country drop down I have

<option value="USA" <?php if ($country == 'USA') { echo "selected"; } ?>>United States</option>

and so forth for each country. This works beautifully, except that changes are not saved from this and sent to the database. I have, in the validation script (an included script), an initialization of the variables as $country = $_POST['country'] for later use since it makes for shorter coding later in the routines.

Can anybody help with ideas about how I can capture the change to the drop down country entry? Or, why is the original value passed instead of the new one? I suspect my need to initialize with the $_GET, but I can't figure out how to both get the value from the query string and then send the changed value in the drop down.

TIA,
Paul


-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux