If you want help with this , i have a AJAX chatbox
http://dracopangaia.awardspace.com/shoutbox/shoutbox.php
Feel free to PM me for help.
If not just look into the source code, as you can view the JS that way.
You cant send the header once something has been printed to the page.
Rethink the page logic, instead of
if(!isset
why not
if(isset
If you dont want to do that , add ob_start();
to the top of the page
I would look at the w3school tutorial on it , as it may be better and more secure.
And to do what you want add
if(!mailcheck('$email'))
{
?>
<script type="javascript">
alert("Invalid");
</script>
<?php
}
else
{
//mail
}
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.