Why is my form automatically sent once every time I refresh or enter the website? & lt; form & nbsp; nameinfo & nbsp; & methodpost & nbsp; action & nbsp; onSubmitreturn & nbsp; formcheck () & gt; & nbsp; & lt; label & nb
$ Name = isset ($ _ POST ['uname'])? $ _ POST ['uname']: "";
$ Phone = isset ($ _ POST ['phone'])? $ _ POST ['phone']: "";
$ Company = isset ($ _ POST ['Company'])? $ _ POST ['Company']: "";
$ Message = isset ($ _ POST ['message'])? $ _ POST ['message']: "";
$ Msg = "name:". $ name ."
"." Phone: ". $ phone ."
"." Company: ". $ company ."
"." Message: ". $ message;
$ To = "long.cheng@freshds.com ";
$ Subject = "Soriana Contact ";
$ From = $ name;
$ Headers = "From: {$ name }";
If (mail ($ to, $ subject, $ msg, $ headers )){
Echo "script" alert ('Thanks for your support ') script ";
} Else {
Echo "script" alert ('failed') script ";
Return false;
}
?>
Share to:... 'data-pics = ''>
------ Solution --------------------
Reference:
The form is sent directly.
In this case, you did not determine whether to write a task. of course, it was sent directly.