Jump to content

Archived

This topic is now archived and is closed to further replies.

brown2005

select

Recommended Posts

hi i have:-

$select_type_sql = "SELECT * FROM affiliates_types ORDER BY types_name ASC;";
$select_type_result = mysql_query($select_type_sql) or die(mysql_error());

echo" <select name='types' class='text'>";
while ($select_type_array = mysql_fetch_array($select_type_result))
{
echo '<option value="'.$select_type_array['types_id '].'">'.$select_type_array['types_name'].'</option>';
}
echo"</select>";

it shows up in the combo box, but dosnt post the value...

any ideas why?

Share this post


Link to post
Share on other sites
hmm.. well your code looks fine. so when you click submit and in the new page if you try to echo $types or $_POST['types'] you get nothing?

also, you are populating your dropdown with type_name but you are passing types_id with it, is this really what you are trying to do?

example: dropdown box might show Betty, Sue, George but you are actually passing 23, 19, 56 not Betty, Sue or George

if so, is types_id a valid column name in your db?

Share this post


Link to post
Share on other sites
sorry for bothering you...

ive solved it myself..

i left a bloody gap after the types_id...

silly clown..

thanks for the help

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.