Email results from database


#1

I am trying to create a reminder email based on the contents in a sql database.

I can echo the results in the page but when I put the code in the mail part its not doing anything

Here is the code

<?php
mysql_select_db($database_dbConnect, $dbConnect);
$query_reminder = "SELECT linkUsers.uPass  FROM linkUsers WHERE linkUsers.email = '$uemail'";
$reminder = mysql_query($query_reminder, $dbConnect) or die(mysql_error());
$row_reminder = mysql_fetch_assoc($reminder);
$totalRows_reminder = mysql_num_rows($reminder);
?>
<?php 
$contMsg = $uPass; also tried 'uPass'; and ($_GET['uPass']; but still nothings
$contSubject = "Password Reminder";
$contHeaders = "From: $contName <$contEmail>n";
$contHeaders .= "Reply-To: $contName <$contEmail>n";
?>
<?php
$mail_sent = @mail( $uemail, $contSubject, $contMsg, $contHeaders );
echo $mail_sent ? "Please check your Inbox" : "There was a problem retreiving your Details";
?>

Any suggestion anybody


#2

have u tryed to remove the @ in front of mail().
are u getting any errors then?


#3

I am not getting any error anyway.

The message that is getting sent is either blank or $uPass not the actual value


#4

try $row_reminder[‘uPass’].


#5

Thanks that seems to have worked

Regards

Andy