<?php

//productname email

 

 

if( isset($_GET['mail']) )
{ 
  $email = $_GET['mail'];    
}
else
{
  print_r("没有输入邮箱!");
  exit;
}

if( isset($_GET['name']) )
{ 
  $product = $_GET['name'];    
}
else
{
  print_r("没有输入系统!");
  exit;
}



//连接MySQL
$conn = @mysql_connect("localhost", "gili0512", "Jg4GS97gWVSw");

print_r("1111111111!");
if($conn == FALSE)
{	
  print_r("连接失败!");
  exit;
}

//选择数据库
mysql_select_db("gili0512_livecheck");

 
//执行SQL
$result = @mysql_query("INSERT INTO gsgiveawayinfo(id,Email,Product) VALUES (0,'$email','$product')");
			
 
 

//关闭连接
mysql_close();



 if($product=="Dingyue")
 {
  echo "<script>alert('You have successfully subscribed to our newsletter!');history.back();</script>"; 
  exit;
 }

?> 
