I want to put 1 variable in my send.php page and get its value by if statement on 2nd (page-contact-us.php)page,
because I have my form in 2nd page with
<form action="<?php bloginfo('template_directory');?>/send.php" method="post" id="contactform">
and in my first page (send.php) i have if statement like,
if($security=="10") {
mail($to,$subject,$message);
$var='1';
}
else {
$var='2';
}
and on my page-contact-us.php page I want to get this mentioned $var above,
and use this $var value with if else statement like,
if ($var = "1") {
echo ('<span class="success">Success!</span>');
}
else if ($var = "2") {
echo ('<span class="error">Error!</span>');
}
How i can achive this ? this is not working for me. :(