As well I tried starting from scratch and nothing
<?php
class contactme
{
function contact()
{
$to = '****';
$_SESSION[input] = $_POST['captcha'];
$from = $_POST['from'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$captcha = $_POST['captcha'];
if($from && $subject && $message)
{
mail($to, "$subject", $message, "From:$from");
echo "Thank you, $from, message has been sent";
}
else
{
echo "All fields are required in order to send message";
}
}
}
class captcha
{
function intCap()
{
session_start();
$math[1] = rand(0,20);
$math[2] = rand(0,20);
$_SESSION[ans] = $math[1] + $math[2];
echo "$math[1]".'+'."$math[2]";
$_SESSION[input] = $_POST['captcha'];
if(!empty($_POST['captcha']) && $_SESSION[ans] == $_SESSION[input])
{
echo "They match";
session_destroy();
}
else
{
echo "";
}
}
}
?>