Jump to content

select


brown2005

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?
Link to comment
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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.