Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Looks like you're missing a Submit button.</p> <p>You do not have to use AJAX at all, nor jQuery. You can submit your form and process the selection value as you see fit.</p> <p>The selected value in the select Tag will be sent to dar_alta_soniador.php, and that file will process that data, using the exact code you wrote:</p> <pre><code>$_POST['asociacion_seleccion'] </code></pre> <p>So, in dar_alta_soniador.php you will write that code:</p> <pre><code>$ingresaAsociacion = pg_escape_string($_POST['asociacion_seleccion']); </code></pre> <p>And then perform the query. You do not even have to worry about sending the data around in a session variable, POST does it for you already.</p> <p>So everything should be OK in your code, or I may have misunderstood your question. Do you have an error message or get some inappropriate behavior?</p> <p>Maybe the submit button is missing? I use a code like this:</p> <p>For the select tag:</p> <pre><code>&lt;div class="controls"&gt; &lt;select name="list_name"&gt; &lt;option&gt;List&lt;/option&gt; &lt;?php foreach ($nucleos as $inner_array) { $out = "&lt;option&gt;" . $inner_array['name'] . "&lt;/option&gt;"; echo $out; } ?&gt; &lt;/select&gt; &lt;/div&gt; </code></pre> <p>And for the Submit button:</p> <pre><code>&lt;div class="control-group"&gt; &lt;div class="controls"&gt; &lt;button type="submit" class="btn"&gt;Confirm&lt;/button&gt; &lt;br/&gt; &lt;/div&gt; &lt;/div&gt; &lt;/form&gt; </code></pre> <p>I am using bootstrap here for style, HTML and CSS. Nothing more.</p> <p>Best wishes,</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload