I have a form which registers new members. I want the values members fill to be emailed to me. I want all the form fields to be emailed to me. I tried this below but the message could not display. Everything else works. How can I get the message to show. Can someone show me. Now the form and my attempt:
<form method = "post" action = "<?php print($_SERVER['PHP_SELF']);
<table border = "0" cellspacing = "0" cellpadding = "10" width = "50%" align = "center" style = "height: 10%;">
<td colspan = "3" valign = "bottom">
<span class = "bold">Please choose a Username and Password</span> <br>
<span class = "hilight"></span>
</td>
</tr>
<tr>
<td colspan = "3" height = "1">
<a href = "index.php">Back</a>
</td>
</tr>
<tr>
<td width = "30%" height = "10" valign = "bottom">
<span class = "hilight">Username</span>
</td>
<td width = "70%" height = "10" valign = "bottom">
<input type = "text" id = "user" name = "user" style = "width: 80%" class = "text" tabindex = "1">
</td>
<td rowspan = "7" width = "16" height = "16" align = "right" valign = "bottom">
<input type = "hidden" name = "joined" value = "<?php print(date("d.m.Y H:i:s", mktime())); ?>">
<input type = "Image" src = "signup.gif" width = "60" height = "30" name = "submit" alt = "signup" border = "0" align = "top" onfocus = "return checkFields();" tabindex = "10"></a>
</td>
</tr>
<tr>
<td width = "30%" height = "10" valign = "bottom">
<span class = "hilight">Password</span>
</td>
<td width = "70%" height = "10" valign = "bottom">
<input type = "password" id = "pass" name = "pass" style = "width: 80%" class = "text" tabindex = "2">
</td>
</tr>
<tr>
<td width = "30%" height = "10" valign = "bottom">
<span class = "hilight"> Confirm Password</span>
</td>
<td width = "70%" height = "10" valign = "bottom">
<input type = "password" id = "pass2" name = "pass2" style = "width: 80%" class = "text" tabindex = "3">
</td>
</tr>
<tr>
</tr>
</table>
<?php
$to = "habibsaah@yahoo.co.uk" ;
$subject = "New Registration" ;
$msg =
mail($to, $subject, $msg) ;?>
</form