I am needing help with Breaking down this code and understanding it. What I am needing to do is when they win a bid on this site it sends an e-mail when it sends the e-mail it sends everything from all venders and there winning stuff as well .
Here is the code take a look and see
$contents = “Congratulations,\n\nYou are receiving this email from Biducation to inform you that your bid was accepted. Your contact is $bidfname $bidlname and they can be reached at $bidemail or by phone at $phone Be sure to contact Mr or Mrs $bidlname to finalize this transaction. \n\n Thank you for the difference you make in our communitites by doing business with communitites through Biducation,\n\nThe Biducation Team on behalf of $schoolname.”;
if($contents != “”)
{
$headers = “From: $from”;
mail($to,$subject,$contents,$headers);
//echo $contents;
/*
require_once ‘includes/Mail/mail.php’;
$host = “mail.syndeoclients.com”;
$username = "[email protected]";
$password = “synd30”;
$headers = array ('From' => $from, 'To' => $to, 'Subject' => $subject);
$smtp = Mail::factory('smtp', array ('host' => $host, 'auth' => true, 'username' => $username, 'password' => $password));
$mail = $smtp->send($to, $headers, $contents);
if (PEAR::isError($mail)) {
echo $mail->getMessage();
}
*/
$q = "update tbl_bids set bid_status = '5', bid_awarded_to = \"$winnerid\", bid_payment_status = '0' where bid_id = \"$bid\"";
mysql_query($q);
echo "The award process has been completed and an email has been sent to the bid owner and the winning vendor. Thank you.";
}
}
else {
echo "You didn't select a recipient. Please use your browser's back button to return to the previous page.";
}
}