Help with PHP

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

 



I'm not sure if this is the correct distro to be sending this question to,
if it's not, let me know which one I should send it to.

I am having an issue where a variable in on php file won't go to the next
php file:

Here is the code I am using:

get colors
   $get_colors = "select Cat_Name from link_categories order by cat_name";
   $get_colors_res = mysql_query($get_colors) or die(mysql_error());

   if (mysql_num_rows($get_colors_res) > 0) {
        $display_block .= "<P><strong>Categories:</strong>
       <select name=\"sel_item_color\">";
        while ($colors = mysql_fetch_array($get_colors_res)) {
          $item_color = $colors['Cat_Name'];
          $display_block .= "<option
value=\"$item_color\">$item_color</option>";
        }
       $display_block .= "</select>";
   }

This gives me a drop down and when I select the item in the drop down that I
want, it should go into the variable "sel_item_color"

then in my included script I have

$cat_name = $_POST['sel_item_color'];

when i try to echo it, nothing comes up.  Can anyone help me figure this
out?

Thanks
-Rich


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

  Powered by Linux