Jump to content

[SOLVED] sending a email using php help


jigsawsoul

Recommended Posts

i used this same code before and it seemed to work just fine, but now i don't seem to get sent any email's although it echo's confirmation email sent. any ideas why this happening ?

 

$result = 	"SELECT * FROM events e
			LEFT JOIN artists ON e.artist_id=artists.artist_id
			LEFT JOIN venues ON e.venue_id=venues.venue_id
			LEFT JOIN sales ON e.event_id=sales.event_id
			LEFT JOIN gb_login ON sales.login_id=gb_login.login_id
			LEFT JOIN gb_customers ON gb_login.customer_id=gb_customers.customer_id
			WHERE e.event_id = {$_GET['id']}";

$result = mysql_query( $result ) or die ( mysql_error() );

$row = mysql_fetch_assoc ( $result );

$current_venue = $row['venue'];
$current_artist = $row['artist'];
$current_date = $row['date'];
$current_price = $row['price'];
$user_email = $row['email'];
$user_firstname = $row['firstname'];
$user_surname = $row['surname'];

$subject = "Event Confirmation";

$web = "Gig Bookers";
$msg = "Gig Bookers - This is a confirmation email to say you have purchased $reqtickets Ticket(s) at price $current_price per ticket for $current_artist playing at $current_venue on $current_date. Thank You";

$body = "Sender: " . $user_firstname . " " . $user_surname . "\n\nEmail: " . $email . "\n\nWebsite: " . $web . "\n\nMessage:\n\n" . $msg;

if (mail($email, $subject, $body)) { echo("confirmation email sent"); }
else { echo("confirmation email couldn't send"); }

Link to comment
https://forums.phpfreaks.com/topic/169466-solved-sending-a-email-using-php-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.