Jquery animate php echo error in html
<p>I'm trying to animate a certain given error from the php form validation in the main html page. My problem is that I don't know how to pass the error to trigger the jquery script to slide a message on top the form in the browser page.</p>

<p>html - contact.php</p>

<pre><code>&lt;form method="post" name="contact_form" action="message_handler.php"&gt;
&lt;input type="text" class="textbox" name="name" maxlength="12" /&gt;
&lt;input type="text" class="textbox" name="last_name" maxlength="12" /&gt;
&lt;input type="text" class="textbox" name="email" maxlength="40" /&gt;
&lt;input type="text" class="textbox_2" name="title" maxlength="40" /&gt;
&lt;textarea name="message" &gt;&lt;/textarea&gt;
&lt;input type="submit" value="Send Form"&gt;
&lt;/form&gt;
</code></pre>

<p>php - message_handler.php</p>

<pre><code>  $name = $last_name = $visitor_email = $title = $message = $about = $validation = '';
  $name = $_POST['name'];
  $last_name = $_POST['last_name'];
  $visitor_email = $_POST['email'];
  $title = $_POST['title'];
  $message = $_POST['message'];
  $about = $_POST['about'];
  $validation = $_POST['validation'];
  $errors = array();

  if( empty($name) || empty($visitor_email) || empty($message) || empty($validation))
  { 
        echo 'Required fields.';
  }
</code></pre>

<p>jquery - general_script.js</p>

<pre><code>$('.error_message').animate({'width':300}, {queue:false, duration:200});
</code></pre>
