But I'm not receiving anything through the PHP code.
It's marked-up so you should be able to see my thought process.
<?php
if (isset($_POST['email']))
{
// Alright, an email was input. Let's check.
if ($_POST['email'].indexOf("@") != null && $_POST['email'].indexOf(".") != null)
{
// Nice. It's a valid email address.
// It's good. Just stop here, it will return null (hopefully).
}
else
{
echo "Error: Not a valid email address!";
}
}
else
{
echo "Error: No email was given!";
}
function checkStr($var)
{
$var = strip_tags($var);
$var = htmlentities($var);
return stripslashes($var); // I wonder if this counters the '@' and '.' character..
}
?>
I'm a bit of a n00b to PHP, forgive me. But this isn't professional work, it's just testing. Thanks

New Topic/Question
Reply



MultiQuote




|