Hi, How to email some data from MYSQL database using PHP? Say the customer forgot his login info and I want to email them the login info after searching the database with their ID and send the data back to them using the email in file.
Thanks, that is an awesome website. I did try the following code. Everything is fine except the line $to = .... Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING I don't know what I am missing at the line $to... $dealer_info = mysql_fetch_array ($get_dealer_info); $to = "$dealer_info['email']"; $subject = "Your login info to sample.com"; $email = "xxx@sample.com" ; $body = "user ID: /n".$info['dealerid']."username: ".$info['username']."password: ".$info['password']; $headers = "From: $email"; $sent = mail($to, $subject, $body, $headers) ;