Hi
I am sending mail with php, passing information from an html page via input.
So basicly I have two files: The html and the sendmail.php pages… And the output message (success or the failure) appears on a blank page. (I think on the sendmail.php page itself)
My question is: I want the output message appear on the same place where the user enters their information. I dont want a completely blank page to show the output message.
My php code is:
<?
$to = “
$subject = “Program Hakkında Yorum”;
$name = $_REQUEST[‘name’] ;
$age = $
$sex = $_REQUEST[‘sex’] ;
$body = $_REQUEST[‘id1’] . $_REQUEST[‘comment’] . $
$headers = “From: $name”;
$sent = mail($to, $subject, $body, $headers) ;
if($sent)
{echo “success”; }
else
{echo “failure”; }
?>
I know this is a starter question, I am just learning php and I appreciate any help. Thanks…