emphasis_insert1

[insert_php]

$Name=trim ($_POST[‘Name’]);
$Certificate=trim($_POST[‘Certificate’]);
$details=trim($_POST[‘details’]);
$Release_Date=trim($_POST[‘Release_Date’]);
$level=trim($_POST[‘level’]);
$note=trim($_POST[‘note’]);
$ccode=trim($_POST[‘ccode’]);

$t=time();
$date = date(“Y-m-d”,$t);

/*
$conntion=mysqli_connect(‘ahmadnahaascom.fatcowmysql.com’,’goodline’,’N1234567e’,’ss_dbname_b3d2a5c157′) or die (‘No conntion’);

$query=”INSERT INTO `emphasis` VALUE(‘$Name’,’$Certificate’,’$details’,’$Release_Date’,’$level’,’$note’,’$ccode’)”;
$result=@mysql_query($query);
*/

$servername = “ahmadnahaascom.fatcowmysql.com”;
$username = “goodline”;
$password = “N1234567e”;
$dbname = “ss_dbname_b3d2a5c157”;

// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die(“Connection failed: ” . $conn->connect_error);
}

$sql = “INSERT INTO emphasis (Name, Certificate, details, Release_Date, level, note, ccode)
VALUES (‘$Name’,’$Certificate’,’$details’,’$date’,’$level’,’$note’,’$ccode’)”;

if ($conn->query($sql) === TRUE) {
echo “New record created successfully”;
} else {
echo “Error: ” . $sql . “
” . $conn->error;
}

$conn->close();

/*

$query=”INSERT INTO emphasis (Name, Certificate, details) VALUES (‘John’, ‘Doe’, ‘john’)”;

if (!empty ($Name))
{

$conntion=mysql_connect(‘ahmadnahaascom.fatcowmysql.com’,’goodline’,’N1234567e’) or die (‘No conntion’);
mysql_select_db(‘ss_dbname_b3d2a5c157’,$conntion);

$query=”INSERT INTO `emphasis` (Name, Certificate, details, Release_Date, level, note, ccode) VALUE(‘$Name’,’$Certificate’,’$details’,’$Release_Date’,’$level’,’1′,’1′)”;
$result=@mysql_query($query);
header(“Location:http://ahmadnahaas.com”);
}

*/

echo $Name.’
‘;
echo $Certificate.’
‘;
echo $details.’
‘;
echo $Release_Date.’
‘;
echo $level.’
‘;
echo $note.’
‘;
echo $ccode.’
‘;

[/insert_php]