I have the following code in my file but when i load the file in my browser i get code all over the place. I'm pretty sure that its because of the first function.
Can anyone help?
<?php
function filled_out($form_vars)
{
// test that each variable has a value
foreach ($form_vars as $key => $value)
{
if (!isset ($key) || ($value == ''))
return false;
}
return true;
}
function valid_email($address)
{
// check an email address is possibly valid
if (ereg("[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$", $address))
return true;
else
return false;
}
?>