Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP: Button not proceeding to the next page under IF ELSE
    primarykey
    data
    text
    <p>I have a question. I have a little problem using PHP regards the <code>IF ELSE</code>. I have a condition there where, when I choose in the dropdown is "All" the save button will be disabled, and it's working. But, when I choose the "Top" the save button is enabled yet it's not proceeding to the next page.</p> <p>Before I place it in <code>IF ELSE</code>, the save button is working but then when I place it to the <code>IF ELSE</code> save button, is not proceeding in the next page.</p> <p>Below is my code:</p> <pre><code> $dropdown_value = (string)$_POST["id"]; if ($dropdown_value == 'All') { echo "&lt;input type='submit' name='save' value='Save' disabled onClick='this.form.action='save_data.php'; this.form.submit()'&gt; "; $all = mysql_query("SELECT fldBldgName FROM tblbuildings"); while ($row = mysql_fetch_array($all)) { echo "&lt;div&gt;&lt;input type='checkbox' name='play[]' class='chk_boxes1' value='" . $row['fldBldgName']."'&gt;"; echo $row['fldBldgName'];"&lt;/div&gt;"; } } else if ($dropdown_value == 'Top') { echo "&lt;input type='submit' name='save' value='Save' onClick='this.form.action='save_data.php'; this.form.submit()'&gt; "; echo "&lt;div&gt;&lt;input type='checkbox' class='checkall'&gt; Check all&lt;/div&gt;"; $top = mysql_query("SELECT fldBldgName FROM tblbuildings ORDER BY fldBldgName ASC LIMIT 30"); while ($row = mysql_fetch_array($top)) { echo "&lt;tr&gt;&lt;td&gt;"; echo "&lt;div&gt;&lt;input type='checkbox' name='play[]' class='chk_boxes1' value='" . $row['fldBldgName']."'&gt;"; echo $row['fldBldgName'];"&lt;/div&gt;"; echo "&lt;/td&gt;&lt;/tr&gt;&lt;br/&gt;"; } } </code></pre>
    singulars
    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.
 

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