Ok, Here is the script that I'm using now on the page. I'm still getting an error:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /webapp/vhosts/gspot@gspotracing.com/EmailUserinfo.php on line 30
*I have also tried everyother way using all the scripts that have been supplied on this thread. Changin anything in this script below only refreshed the page and nothing would happen.
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#000000">
<?php
require_once('Connections/GspotMembers.php');
// if form has been submitted
if (isset($_POST['Remind_Me'])) {
// My SQL statement
$sql = "SELECT Password,EmailAddress FROM users WHERE userName='$UserName'";
// Pick my DB
// Are you sure that Connections/GSpotMembers.php
// doesn't select your DB?
mysql_select_db($database_gspot_gspotracing_com, $Members);
// Query the DB
$query = mysql_query($query) or die(mysql_error());
// Use the the query in an array called result
$result = mysql_fetch_array($query);
$Password = $result['Password'];
$thisEmail = $result['EmailAddress'];
$message = "Your password is $Password";
$sendmail = mail("$thisEmail","G-Spot Racing Login Information.","$message",_"From: [email]support@gspotracing.com\n");
if ($sendmail == 1) {
echo "An email was sent to $thisEmail";
}else{
echo 'No email sent';
}
?>
<form action="<?=$HTTP_SERVER_VARS['PHP_SELF']?>" method="post">
<table width="590" border="0" cellspacing="0" cellpadding="0">
<tr> </tr>
<tr>
<td><div align="center"><font color="#00FF00">Complete this form and your
password will be sent to the Email address you used when you signed
up.</font></div></td>
</tr>
<tr>
<td bgcolor="#FFFF00"><div align="center"></div></td>
</tr>
<tr>
<td bgcolor="#FFFF00"><div align="center">UserName:
<input type="text" name="UserName" maxlength="20" size="30">
</div></td>
</tr>
<tr> </tr>
<tr> </tr>
<tr>
<td bgcolor="#FFFF00"> <div align="center">
<input type="hidden" name="remind_me" value="1">
<input type="submit" name="Submit" value="Submit">
</div></td>
</tr>
</table>
<br>
</form>
</body>
</html>
<?php
}
?>
*Do I have to use the "Remind_Me" scripting in this script? Like I stated earlier, I'm brand new to all of this scripting...I hope you can help. Thanks for everything so far. Also, if it helps, I posted earlier in this thread, how my database was set-up.
Thanks,
Kyle