sorry for the lack of information. I am trying to get the username and password from the database, where the username is the email address, and send the user their password. i know it is not the most secure option, but i need to start basic. here is the code i have written to start off:
<table width="100%" border="0">
<form>
<tr>
<td><p class="password" align="center">Please enter your username: </p></td>
<td><input type="text" size="35" name="username"></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td><p align="right">(Click here to send password to email address)</p></td>
<td align="center"><input type="submit" name="mailpassword" value="Send"></td>
</tr>
</form>
</table>
<?php
if ($mailpassword)
{
$db = mysql_connect("****", "*", "*");
mysql_select_db("******",$db);
$select = mysql_query("SELECT password, username FROM member WHERE username LIKE '$username';", $db) or die(mysql_error());
while ($myrow = mysql_fetch_array($select))
{
mail($username, "Password Reminder", "Here is your password: "$password, "From: Maitland Medical");
}
?>
This code doesnt seem to be working.
Can anyone help??
thanks