title: Undefined Index in my dropdown list
body: <p>I'm a newbie to PHP programming and I am in the module of using dropdown list. I was looking in the internet and try to copy some and study about it, but (nosebleed...) because I am just starting.. I get this error</p>
  
  <p>A PHP Error was encountered Severity: <code>Notice Message: Undefined index: select1</code> ........</p>
  
  <p>here's the code. I hope somebody helps to enlighten me.</p>
  
  <pre><code>        &lt;label for="unit"&gt;Province&lt;/label&gt;&lt;select name="select1" onChange="showState(this.value);"&gt;
              &lt;option value=""&gt; --- Select --- &lt;/option&gt;              
              &lt;?php
              while ($line = mysqli_fetch_array($result)) {
              ?&gt;
              &lt;option value="&lt;?php echo $line['prov_id'];?&gt;" &lt;?php if($line['prov_id']==$_REQUEST["select1"]) { echo "selected"; } ?&gt; &gt; &lt;?php echo $line['prov_name'];?&gt; &lt;/option&gt;
              &lt;?php
              }
              ?&gt;
              &lt;?php
  </code></pre>