PHP and Jquery How To
<p>The form is hidden when the page loads and shows up when the Send us mail is clicked, I've been able to do it in such a way that when a user clicks on the Send us mail button the form will slide down, using jquery. but the challenge am having now is that when I click the button Send Mail the page reloads and this makes the jquery to run again and the form is hidden again. Though I've check the fields to be sure if they contain a value before submitting. But now even when the fields contain a value or not after clicking the Send Mail button in the form the page reloads and make the form to hide again.
Please can anybody tell me what I can do to solve this problem?
Thanks in anticipation.</p>

<p>Below is my php and jquery code:</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(function(){
    $("#contact_Holder").hide();
    slideDown();
});

function slideDown(){
    $("#slideDown").click(function() {
        $("#contact_Holder").slideDown("normal");
    });
    $("#sendmail").click(function() {
        $("#contact_Holder").show();
    });
}
</code></pre>

<p></p>

<pre><code>&lt;?php 
if(isset($_POST['sendmail']))
{
if(!(isset($_POST['txtname']) || ($_POST['txtsubject']) || ($_POST['txtmessage'])) || empty($_POST['txtname']) || empty($_POST['txtsubject']) || empty($_POST['txtmessage']))
    {
echo '&lt;font color="#090" size="3" face="Palatino Linotype,serif"&gt;'."please fill all fields thank you!".'&lt;/font&gt;';
    }
else
{
$to = 'info@mail.com';
$subject = $_POST['txtsubject'].' '.$_POST['txtname'];
                $body = $_POST['txtmessage'];

                if(mail($to,$subject,$body))
                {
                    echo('&lt;font color="#090" size="3" face="Palatino Linotype,serif"&gt;'."Your message has been sent successfully".'&lt;/font&gt;');
                }
                else{ echo('&lt;font color="#090" size="3" face="Palatino Linotype,serif"&gt;'."Message Delivery Failed!".'&lt;/font&gt;'); }
            }
        }
    ?&gt;
</code></pre>
