I have tried this script. It works fine except for the printing of the $tags
<?php
/* Connecting, selecting database */
$link = mysql_connect("localhost", "username", "pwl")
or die("Could not connect");
mysql_select_db("tycooneden_com") or die("Could not select database");
$query = "SELECT * FROM clans WHERE clan_name = '$form_clan'";
$result = mysql_query($query) or die("Query failed");
$foo=mysql_fetch_array($result);
/* Start the clan defining */
$clan_admin=$foo['clan_admin'];
$clan_admin_email=$foo['clan_admin_email'];
mysql_close($link);
?>
<?
/* recipients */
$to = "Sarah <email>";
/* subject */
$subject = "Your clan";
/* message */
$message = '
The user
echo "$form_username";
wishes to join your clan.
The user level they have applied for is
echo "$form_level";
To activate their account, click here $here
';
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* additional headers */
$headers .= "From: TycoonEden Admin Staff <mail>\r\n";
/* and now mail it */
mail($to, $subject, $message, $headers);
?>
<? echo ("$message");?>
<br><br>
<? echo ("$to");?><br><br>
<? echo ("$form_username");?><br><br>
It echos the $tags fine at the end. But not in the email 🙁. THis is the printed result of $message:
The user echo "$form_username"; wishes to join your clan. The user level they have applied for is echo "$form_level"; To activate their account, click here $here
Any suggestions?
Alex.