Thanks for the finding the problem but im nut the best at php sow i edited the code so it looks like this but i't dosent work but its a start
<?
$username = $_POST['username'];
include ("../login/mysqlcon.php");
if (!$username) // they haven't filled out the form yet.
{
?>
<html>
<body>
<form action="getpassword.php" method="post" name="getpass">
Username:<br>
<input class="inputSidebar" type="text" name="username"<br>
<input class="button" type="submit" name="submit" value="Get password">
</form>
</body>
</html>
<?
}
else // form has been filled out
{
$mysqlcon1 = "SELECT username FROM reg_info WHERE username='$username'";
$result1 = mysql_query($mysqlcon1) or die("Error: " . mysql_error);
if (mysql_num_rows($result1) == '1') {
/*****Dont forget this*******/
$mysqlcon2 = "SELECT * FROM reg_info where username='$username'";
$result2 = mysql_qurey($mysqlcon2) or die("Error: = . mysql_error);
$row = mysql_fetch_row($result2);
print "<p><center><big>Welcome $username Please click <a href=\"index.php\">
here to continue to flameline.com in some seconds you will recive a email with your password in it.</big></center></p>";
/*******mail function here!***********/
if (mail($row['email'], "Your Password", "Your password is ", $row['password']))
echo "Email Sent Successfully";
}
else
{
print "<p><center><big>Sorry, incorrect $username.</big></big></center></p>";
print "<p><center><big>if not a member <a href=\"register.php\">
click here to register</big></center></p>";
}
}
?>