[insert_php] //include(‘cipher.php’);
//$date = Cipher::decrypt(rawurldecode($_GET[‘data1’]));
$temp1 = $_GET[“temp1”];
//$location = Cipher::decrypt(rawurldecode($_GET[‘data2’]));
$temp2 = $_GET[“temp2”];
//$price = Cipher::decrypt(rawurldecode($_GET[‘data3’]));
$temp3 = $_GET[“temp3”];
//$trainingName = Cipher::decrypt(rawurldecode($_GET[‘data4’]));

$temp4 = $_GET[“temp4”];//$name=$_GET[“name”];//$email=$_GET[“email”];//$phone=$_GET[“phone”];//$username=$_GET[‘username’];
[/insert_php]

[insert_php] $temp4 [/insert_php]



[insert_php] //$var = $_POST[“quantity”];[/insert_php]

Selected Course Details:

Course Name Date Price (INR) Place Quantity
[insert_php] $temp1 [/insert_php] [insert_php] $temp3 [/insert_php] [insert_php] $temp2 [/insert_php]
Total(including 14.00 % Service Tax) 


Payment Method :

[insert_php]

if (isset($_POST[‘submit’]))
{

$coupon=$_POST[‘coupon’];
$name=$_POST[‘name’];
$email=$_POST[’email’];
$phone=$_POST[‘phone’];
$company=$_POST[‘company’];

$connect = mysql_connect(“localhost”,”gte_gteindia”,”gte123ind”)
//$connect = mysql_connect(“localhost”,”root”,””)
or die(mysql_error());
$sel=mysql_select_db(“gte_gteindia”);

$result=mysql_query(“select * from offer where coupon=’$coupon'”)
or die(mysql_error());

if(mysql_num_rows($result)==0)
{
print “
“;
echo ‘‘;
}
else
{

//check for duplicate or re-entered coupon

mysql_query(“insert into couponverify values(‘$coupon’)”)
or die(““);

//store values in database

mysql_query(“insert into awscoupondetails values(‘$coupon’,’$name’,’$email’,’$phone’,’$company’)”)
or die(mysql_error());

//send mail

ini_set(“include_path”, “.”);
$mail->PluginDir = “/home/training.gte-india/www/”;
require(“class.phpmailer.php”);
$sleeptmp = 0;

$coupon = $_POST[‘coupon’];
//$name = $_POST[‘name’];
//$email = $_POST[’email’];
//$phone = $_POST[‘phone’];

$table=”

Coupon Code ID : $coupon
Name : $name
Email : $email
Phone : $phone
Company : $company
Selected Training Course : $temp4
Selected Training Date : $temp1
Selected Training Location : $temp2

“;

$subject = “AWS Coupon Code Registration Details”;
$desemail = “training@gte-india.com”;
$mybody = “$table”;

$mail = new phpmailer();
$mail->IsSMTP();
$mail->Mailer = “smtp”;
$mail->Host = “mail.gte-india.com”; //mail.gte-india.com localhost mail.training.gte-india.com
$mail->WordWrap = 50;
$mail->IsHTML(true);
$mail->Subject = $subject;
$mail->Body = $mybody;
$mail->From = $Email;
$mail->FromName = $firstname;
$mail->AddAddress(“$desemail”);
$mail->AddCC(“arunkumar@gte-india.com”);
//$mail->AddCC(“extra-address2@domain.com”);
//$mail->AddCC(“extra-address3@domain.com”);
$mail->SMTPDebug = 1;

if($mail->Send())
{
echo ‘‘;
exit();
}
flush();

}

}
[/insert_php]