Hello, Im currently trying to insert email templates into mysql (does fine) but then using them to send a email. So, in my database i have: My basic php code to send this email: $query = "SELECT * FROM multi_emails WHERE id = '1'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result); $system_email = "matt@blah.com"; $headers = "From: $system_email\r\n"; $headers .= "Reply-To: $system_email\r\n"; $headers .= "Return-Path: $system_email\r\n"; mail($email,$row['subject'],$row['message'],$headers); PHP: When the email is sent, it doesn't substitute the variables in, rather i get sent $password instead of my password. Any ideas? Thanks
Register Globals are the worst security risk you can have...well at least top 3. Instead, do something like this for example: $sitename = 'boo.com'; $email = ' Thank you for coming to %mysite%! '; $email = str_replace('%mysite%',$sitename,$email); PHP: That will replacce %sitename% with the site name, for example. register globals = BAD RG will also be totally removed from PHP6.