Levi
Ultimate Member
I've written a php file for a form I've added to my site which (finally) works (woo hoo
)
The contact form is here (albeit unfinished and it isn't validated) but my current host is being crap (yes I will be moving) as their php isn't sending again (good job my synology nas has web server with php built in :up
.
Can anyone tell me how I would get the senders email address in the 'sender box' in outlook rather than my 'email address' as it currently is.
Also can I send a copy to the person filling in the form but have it slightly different to the one sent to me - maybe by using a 1 and 2 number on the mail and message bits as my understanding of php means they're just a 'link' to the relevent parts
thanks in advance
Code:
<?php$to = "my email address";$subject = "Contact from the website";$name = $_REQUEST['name'] ;$reference = $_REQUEST['reference'] ;$telephone = $_REQUEST['telephone'] ;$email = $_REQUEST['email'] ;$message = $_REQUEST['message'] ;$ip = $_SERVER['REMOTE_ADDR'];$message = "Submitted From: $ip \nName: $name \nReference: $reference \nTelephone: $telephone \nE-mail: $email \nComments: $message";mail($to, $subject, $message);header( "Location: /test/success.html" );?>
Can anyone tell me how I would get the senders email address in the 'sender box' in outlook rather than my 'email address' as it currently is.
Also can I send a copy to the person filling in the form but have it slightly different to the one sent to me - maybe by using a 1 and 2 number on the mail and message bits as my understanding of php means they're just a 'link' to the relevent parts
thanks in advance