Note that there are some explanatory texts on larger screens.

plurals
  1. POget radio value in printing method in order to transfer some parameters to another page
    text
    copied!<p>I have this code of PHP:</p> <pre><code> &lt;form action="modificaPriorita.php" method="post"&gt; &lt;table&gt; &lt;tr id="format-tabelle"&gt; &lt;th&gt;&lt;/th&gt; &lt;th&gt;&lt;span class="format-celle"&gt;TITLE&lt;/span&gt;&lt;/th&gt; &lt;th&gt;&lt;span class="format-celle"&gt;TYPE&lt;/span&gt;&lt;/th&gt; &lt;/tr&gt; &lt;?php $res = GestioneSegnalazione::showSegnalazioni(); function drawTable($res) { $title = $res[0]; $idAuthor = $res[1]; $type = $res[2]; for ($i = 0; $i &lt; $num; $i++) { print "&lt;tr class='row'&gt; &lt;td align='center' valign='middle'&gt; &lt;input type='radio' name='radio' value='$title[$i],$idAuthor[$i]'/&gt; &lt;/td&gt; &lt;td align='center' valign='middle'&gt;&lt;span class='format-celle'&gt; $title[$i]&lt;/span&gt;&lt;/td&gt; &lt;td align='center' valign='middle'&gt;&lt;span class='format-celle'&gt; $type[$i]&lt;/span&gt;&lt;/td&gt; ?&gt; &lt;/table&gt; &lt;br&gt; &lt;input type="submit" name="show" value="Show" class='freshbutton-orange' id='show-submit-segnalazione'/&gt; &lt;? if (isset($_POST['show'])) { if ($_POST[radio] == "") { echo("&lt;SCRIPT JavaScript'&gt;window.alert('Select one segnalazione to show');window.location.href='showSegnalazione.php#close'&lt;/SCRIPT&gt;"); } } ?&gt; </code></pre> <p></p> <p>If i select one item in radio button and i press the button 'show' it works, it goes to the other page "modificaPriorita.php" with two parameters: title, idAuthor My problem is if i press the 'show' button without select one item in radio button, it would show me the error 'Select one segnalazione to show', but it goes to the new page ("modificaPriorita.php") without parameters. what can i do to have this error message?</p>
 

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