Can someone help me with this (why doesn't it work):
html:
<form name="form" method="post" action="mail.php">
<select name="country">
<option value="1" selected>Somtehing</option>
<option value="2">Something2</option>
</select>
<textarea name="recipients" cols="30" rows="5"></textarea>
<input type="submit" name="Submit" value="Submit">
</form>
php:
if ($country =1)
{
$message=" blah blah blah 1 ";
}
else
{
$message =" blah blah blah 2 ";
}
mail("$recipients", "subject", "$message", "From: SirOliver@email.co.yu\r\n"
."Reply-To: SirOliver@email.co.yu\r\n"
."Return-Path: <SirOliver@email.co.yu>\n"
."MIME-Version: 1.0\n"
."Content-Type: text/html; charset=iso-8859-1\n"
);
echo "I have sent email to the following address:<br>";
echo "<b>To: $recipients";
?>
As you can see, the idea is to change the body of the message depending to a country of recipient, but i always get only the first message