Note that there are some explanatory texts on larger screens.

plurals
  1. POUndefined index: DLL
    primarykey
    data
    text
    <pre><code>&lt;?php if (isset($_POST['first']) &amp;&amp; isset($_POST['second']) &amp;&amp; isset($_POST['submit']) &amp;&amp; $_POST['DDL'] == "+") { $equals = $_POST['first'] + $_POST['second']; } if (isset($_POST['first']) &amp;&amp; isset($_POST['second']) &amp;&amp; isset($_POST['submit']) &amp;&amp; $_POST['DDL'] == "-") { $equals = $_POST['first'] - $_POST['second']; } if (isset($_POST['first']) &amp;&amp; isset($_POST['second']) &amp;&amp; isset($_POST['submit']) &amp;&amp; $_POST['DDL'] == "*") { $equals = $_POST['first'] * $_POST['second']; } if (isset($_POST['first']) &amp;&amp; isset($_POST['second']) &amp;&amp; isset($_POST['submit']) &amp;&amp; $_POST['DDL'] == "/") { $equals = $_POST['first'] / $_POST['second']; } print $_POST['DDL']; // THIS IS THE LINE THAT RESULTS IN THE ERROR! WHY? ?&gt; &lt;html&gt; &lt;body&gt; &lt;form method="post"&gt; &lt;input type="text" name="first"&gt; &lt;select name="DDL"&gt; &lt;option value="+" selected="selected"&gt;+&lt;/option&gt; &lt;option value="-"&gt;-&lt;/option&gt;b &lt;option value="*"&gt;*&lt;/option&gt; &lt;option value="/"&gt;/&lt;/option&gt; &lt;/select&gt; &lt;input type="text" name="second"&gt; &lt;input type="submit" name="submit" value="Equals"&gt; &lt;input type="text" name="equals" value="&lt;?php if (!empty($equals)) print($equals) ?&gt;"&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>The previous code results in the following error when accessing the index.php file BEFORE SUBMITTING THE FORM:</p> <p><a href="http://i42.tinypic.com/11jaf5x.png" rel="nofollow noreferrer">a busy cat http://i42.tinypic.com/11jaf5x.png</a></p> <p>The php code "print $_POST['DDL'];" is causing the error.</p> <p>Why is this happening? I've already chosen a default value by using "+"...</p>
    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.
    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