MarkT Posted May 23, 2014 Share Posted May 23, 2014 Hi, I have this code; if($_GET['sec'] == $check2['security_code']) {$check = mysqli_query($con,"SELECT * from new_players WHERE email_address = '{$_GET['email']}'");$check2 = mysqli_fetch_assoc($check);mysqli_query($con,"UPDATE new_players SET sent='1' WHERE email_address = '{$check2['email_address']}'");$toemail = "mark.ethompson97@gmail.com";$subject = "Website Form: Player Recruitment Interest";$message = "<html><head> <title>Player Recruitment Interest</title></head><body>Hello,Player interest has been shown with the following details: <br>Player Name: {$check2['player_name']} <br>Parent Name: {$check2['parent_name']}<br>Email Address: {$check2['email_address']} <br>Phone Number: {$check2['phone']}<br>School: {$check2['school']}<br>School Year: {$check2['school_year']}<br>Position: {$check2['position']}<br>Previous Clubs: {$check2['previous_clubs']}<br>Address: <br>{$check2['address_1']}<br>{$check2['city']}<br>{$check2['postcode']}<br /><h4>Email sent via player recruitment form on </h4></body></html>";$from2 = $_GET['email_address'];$from = "{$from2}";$headers = 'MIME-Version: 1.0' . "rn";$headers .= 'Content-type: text/html; charset=iso-8859-1' . "rn";$headers .= "From: ".$from2."rn";mail($toemail,$subject,$message,$headers); And the MySQL query is working fine, but I'm not getting the email? Please can you help? Link to comment Share on other sites More sharing options...
MarkT Posted May 23, 2014 Author Share Posted May 23, 2014 Nevermind, the Query must be after the mail. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now