Jump to content
pinkpanter

ajutor script php

Recommended Posts

<?php

$to = $_REQUEST['sendto'] ;

$from = $_REQUEST['Email'] ;

$name = $_REQUEST['Name'] ;

$headers = "From: $from";

$subject = "Web Contact Data";

$fields = array();

$fields{"Name"} = "Name";

$fields{"Company"} = "Company";

$fields{"Email"} = "Email";

$fields{"Phone"} = "Phone";

$fields{"list"} = "Mailing List";

$fields{"Message"} = "Message";

$body = "We have received the following information:\n\n"; foreach($fields as $a => $B){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); }

$headers2 = "From: test <test@test.com>";

$subject2 = "your request is accepted";

$autoreply = "Thank you for contacting us. Somebody will get back to you as soon as possible, usualy within 48 hours. If you have any more questions, please consult our website at www.oursite.com";

if($from == '') {print "You have not entered an email, please go back and try again";}

else {

if($name == '') {print "You have not entered a name, please go back and try again";}

else {

$send = mail($to, $subject, $body, $headers);

$send2 = mail($from, $subject2, $autoreply, $headers2);

if($send)

{header( "Location: http://www.YourDomain.com/thankyou.html" );}

else

{print "We encountered an error sending your mail, please notify webmaster@YourCompany.com"; }

}

}

?>

am nevoie de ajutor din partea cuiva care se stie php sa imi spuna si mie cum adaug in acest script sa trimita un mesaj .html .

acesta fiind in linia mesajului.

$autoreply = "Thank you for contacting us. Somebody will get back to you as soon as possible, usualy within 48 hours. If you have any more questions, please consult our website at www.oursite.com"; .

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...