PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am trying to setup a mail() form .. so the person can choose from a list of people of whom they want to contact .. I have used a list menu below to choose from:
Then grab the variable using $person = $_POST['person']; which works fine .. it emails the correct person from their choice .. But in the "from" part of the email it displays the email address, How can I set it so in the "from" it displays the name of the person from the select box?
<select name="person" size="2">
<option value="bla@blabla.com|Jim_bo">Jim_bo</option>
<option value="blabla@bla.com|Jack">Jack</option>
</select>
<?
if (!empty($_GET['person']))
{
$info = explode('|',$_POST['person']);
//$info[0] is now his email
//$info[1] is now his name
}
?>