required field error message
<p>I'm using this piece of code to display an error when the field is left empty but it just returns me to the location.</p>

<pre><code>$err = array();
if(empty($native) )
{
$err[] = "ERROR - Enter Native Language";
//header("Location: language.php?msg=$err");
//exit();

 if(!empty($err))  {
   echo "&lt;div class=\"msg\"&gt;";
  foreach ($err as $e) {
    echo "* $e &lt;br&gt;";
    }
  echo "&lt;/div&gt;";    
   }
</code></pre>

<p>Any ideas?</p>
