Soldato
- Joined
- 30 Nov 2005
- Posts
- 3,084
- Location
- London
Can anyone adjust this so when the contact form is sent it puts the name and email address into the "From:". So when the user reads the email it will automatically have the Name/Email Address in the From section.
Thanks
Thanks
PHP:
<?php
$name= $_REQUEST['name'];
$organisation= $_REQUEST['organisation'];
$phone= $_REQUEST['phone'];
$email = $_REQUEST['email'];
$radiobutton = $_REQUEST['radioQuestion'] ;
$mes = $_REQUEST['message'] ;
$arr= array();
$arr[0] = "Name: ";
$arr[1] = $name;
$arr[2] = "\nOrg: ";
$arr[3] = $organisation;
$arr[4] = "\nPhone Number: ";
$arr[5] = $phone;
$arr[6] = "\nEmail Address: ";
$arr[7] = $email;
$arr[8] = "\nQuestion Selection: ";
$arr[9] = $radiobutton;
$arr[10] = "\nMessage is: ";
$arr[11] = $mes;
$msg = ($arr[0]. $arr[1] . $arr[2] . $arr[3] . $arr[4] . $arr[5] . $arr[6] . $arr[7] . $arr[8] . $arr[9] . $arr[10] . $arr[11] );
$headers="Contact Form";
ini_set("sendmail_from","MYEMAIL");
mail( "MYEMAIL", "Contact Form", "$msg", "$headers") ?>