<% $to = 'webmaster@superbike.lv'; $from = 'SUPERBIKE'; //Check if we have something POSTed by the form. if (isset($HTTP_POST_VARS)){ //Start with an empty body for the mail message $body = ''; //Iterate through all the POSTed variables, and add them to the message body. while (list($key, $value) = each($HTTP_POST_VARS)){ $body .= $key . ' = ' . $value . "\r\n"; } //Build up some nice From/Reply Headers $headers = "From: $from\r\n"; $headers .= "Reply-To: $from\r\n"; $headers .="Content-Type:text/plain;"; $headers .='charset="windows-1257"'; //Mail the message out. $success = mail($to, "SUPERBIKE anketa" . date("m/d/Y"), $body, $headers); //Always check return codes from functions. if ($success){ echo "
Paldies. Informācija tiks apstrādāta.
\n"; } else{ echo "
Kaut kas nogļukoja!
Sazinies ar $from
\n"; } } %> Paldies
Aizvērt logu