noob question


Posted on 16th Feb 2014 07:03 pm by admin

i traying to do a php form with auto replay for both(me and the user who send me a mail),

a using this code

Code: <?php
$contact_name = $_POST['emp'];
$contact_email = $_POST['mail'];
$contact_subject = $_POST['nomw'];
$contact_message = $_POST['tele'];



if( $contact_name == true )
{
$sender = $contact_email;
$receiver = "myemail@myhost.com";
$client_ip = $_SERVER['REMOTE_ADDR'];
$email_body = "Name: $contact_name nEmail: $sender nnSubject: $contact_subject nnMessage: nn$contact_message nnIP: $client_ip nn agradecemos o seu intresse no WMC 2010.nn para concluir o seu registo utilize o link....";

$extra = "From: $senderrn" . "Reply-To: $sender rn" . "X-Mailer: PHP/" . phpversion();




if( mail( $receiver, "Flash Contact Form - $contact_subject", $email_body, $extra ) )
{
echo "success=yes";
}
else
{
echo "success=no";
}
}
?>
how i can editt this code to send one copy to me and other to the preson who submited the form??

No comments posted yet

Your Answer:

Login to answer
89 Like 8 Dislike
Previous forums Next forums
Other forums

Simpler method of getting variables from mysql
Hi Guys,

I'm trying to streamline my CMS's code and as I was writing a new page it occured to

Array disappearing in foreach loop
Okay, I have this problem where an array will become undefined in a foreach loop.

Here is the

Help with PHP Calendar code...
Hello, I'm new to this forum and I'm glad I found it.
I wrote this code for a PHP calendar as an

Variable passed to each() is not an array or object
Hi,

This is a email a friend type of form, and it isn't working anymore.

<?

How to create a static html menu from a database
Hi,

I have built a small cms which allows me to create simple html pages and then upload them

Getting PHP to ammended the selected in option field
Hey Guys

thanks for everyones help so far. This site and its users are oozing awesomness.

Advice on how to delete a mysql row using my form
Hi,

I am very new to php and am struggling to work out how to delete a portfolio item (a row

difference between datetimes
($row['totime']-$row['fromtime'])/60

this is giving me 0

example of totime and fromtim

how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s

Accept only alpha characters
I've got this bit of code ready for accepting a phrase:

Code: if (!eregi ("", $_POS

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash