<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script><script language="JavaScript">
setInterval("Ajax();",5000);///////// 10 seconds
$(function(){
Ajax =function(){
$('#dataDisplay').prepend("Hi This is auto refresh example for you <br><br>").fadeIn("slow");}});</script>
var testresults
function checkemail(){
var str=document.validation.emailcheck.value
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (filter.test(str))
testresults=true
else{
alert("Please input a valid email address!")
testresults=false
}
return (testresults)
}
</script>
<script>
function checkbae(){
if (document.layers||document.getElementById||document.all)
return checkemail()
else
return true
}
</script>
<?php // This function tests whether the email address is valid function isValidEmail($email){ $pattern = "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$";
now if you try to open HEADER.PHP you will get an error because global.php includes function.php already. you will get an error saying that function foo() was already declared in global.php, and i also included in Header.php - which means i have included function.php two times.
so to be sure i only include function.php only ONE time, i should use the include_once() function, so my Header.php should look like this: