0

Hi,

I have this code that selects the value of a combobox and it inserts into a input:

<?php
                        echo '<input id="matr_input" style="margin-left:15px;margin-top:10px;" name="id_cat"></input>';



                        $select_images="SELECT * FROM categories WHERE id_category='"./*combobox value*/."'";
                        $query_images=mysql_query($select_images) or die(mysql_error());
                        $image=mysql_fetch_assoc($query_images);
                     ?>
                        <?php
                          $nome_arquivo = $image['img_category'];
                          $arquivo = explode('images/', $nome_arquivo);

                          if($image['img_category']!=''){
                            echo '<div style="margin-left:15px;">'.$arquivo[1].'<a href="delete_category.php?id='.$image['id_category'].'"><img width="10" style="margin-top: 1px; margin-left: 2px;" src="cross-on-white.gif"></a></div> <br />';
                          }
                        ?>


                    <script>
                      function displayVals() {
                        var singleValues = $("#gallery_category_filter").val();
                        var multipleValues = $("#multiple").val() || [];
                        $("input#matr_input").val("" +
                           singleValues +
                           "" +
                           multipleValues.join(", "));
                      }
                      $("select").change(displayVals);
                      displayVals();
                    </script>

But instead of a input i want it to insert in this query:Select

$select_images="SELECT * FROM categories WHERE id_category='"./*combobox value*/."'";
                            $query_images=mysql_query($select_images) or die(mysql_error());
                            $image=mysql_fetch_assoc($query_images);

Can someone help me, please?

Thank you,
PF2G

2
Contributors
1
Reply
3
Views
4 Years
Discussion Span
Last Post by diafol
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.