|
$exista=0;
include('connect.inc');
if (! @mysql_select_db("thestore_thestore") ) {
echo( " Unable to locate thestore " .
"database at this time. " );
exit(); }
$q='SELECT * FROM client WHERE id="'.$_POST["user"].'"';
$res = @mysql_query($q);
if (!$res) {
echo("Error performing query: " . mysql_error() .
" ");
exit();
}
$row = mysql_fetch_array($res);
if (mysql_num_rows($res)>0) {
$exista=1;
}
if (($_POST["user"]=="") or ($exista==0)) {
?>
} else {
$from_mail = "office@thestore.ro";
$headers = "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "From: $from_name <$from_mail>\n";
$headers .= "X-Mailer: PHP\n";
$headers .= "X-Sender: $from_name <$from_mail>\n";
$mess='
|
Parola contului dumneavoastra la magazinul www.thestore.ro este: '.$row["password"].'
|
|
';
$ok = mail($row[12],"Parola TheStore.ro",$mess,$headers,"-f$from_mail");
echo(' Parola pentru contul '.$_POST["user"].' va fost trimisa pe email!
');
echo ('Click aici pentru pagina principala ');
} ?>
|