Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Help if you can. I am wanting to have the user fill in their e-mail address and then it randomely be sent to one of the 3 e-mail addresses. I have tested, Googled and pulled out a few hairs to get this to work. I am a beginner programmer. Any help or suggestions would be greatly appreciated.
Contact Form.Code: Select all
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="Adobe GoLive" />
<title>MySoulQuestions.com</title>
<link href="css/basic.css" rel="stylesheet" type="text/css" media="all" />
</head>
<body>
<div id="cont">
<div id="header"></div>
<div id="content">
<form action="process.php" method="post">
<p>To contact us or for more information please enter your e-mail address.</p>
<p><input type="text" name="Emailadd" size="40"></p>
<p><input type="submit" name="Submit" /><input type="reset" /></p>
</form>
</div>
</div>
</body>
</html>Code: Select all
<?php
$email=array();
$email[0]="davidnwatson@yahoo.com";
$email[1]="dwatson@dcso.nashville.org";
$email[2]="lamandafwatson@yahoo.com";
//send email
$email = $email[rand(0, count($email))];
$subject = "MySoulQuestions: Response Form"'] ;
$message = $_REQUEST['mes'] ;
mail($email, "Subject: $subject",
$message, "From: $emailadd" );
echo "Success";
}
}
else
{
echo "Error";
}
?>Jcart | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]