Why its not displaying current time zone?

I am trying to add parameter in query which passes indian time zone to mysql database server.But when i am passing this query it shows 0000-00-00 00:00:00 in my table.
I am using hostinger php my admin database server.
Please help me to solve this.

<?php


include 'confi.php';

 date_default_timezone_set('Indian/Maldives');

    $email = isset($_POST['email']) ? mysqli_real_escape_string($conn,$_POST['email']) : "";
    $today = date("d/m/Y h:i:s A");

    $sql ="INSERT INTO `i_order` (`ID`, `email`,`date`) VALUES (NULL, '$email', '$today');"; 

    $qur = mysqli_query($conn,$sql);
    if($qur){
        $json = array("status" => 1, "msg" => "success!");
    }else{
        $json = array("status" => 0, "msg" => "error!");
    }

@mysqli_close($conn);

/* Output header */
    header('Content-type: application/json');
    echo json_encode($json);


?>


Source: stackoverflow-php

MySQL / SQL PHP Error [duplicate]

This question already has an answer here:

$sql = "INSERT INTO website (id, username, password, email, timestamp, balance, rank, banned, color, ts3, minecraft, 'ip')VALUES ('', '$username', '$pwsalt', '$email', '$timestamp', '0', '1', '0', 'black', 'unknown', 'PedoBear', '$ip')";

Result:

Error: INSERT INTO website (id, username, password, email, timestamp, balance, rank, banned, color, ts3, minecraft, ‘ip’)VALUES (”, ‘FlareCO’, ‘ilovepokemongoeveryday’, ‘admin@customdomain.co’, ‘1492769557’, ‘0’, ‘1’, ‘0’, ‘black’, ‘unknown’, ‘Pikachu’, ‘125.558.95.254’)
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ”ip’)VALUES (”, ‘FlareCO’, ‘ilovepokemongoeveryday’, ‘admin@customdomain.co’, ‘1492769557’ at line 1

What i need to fix ?


Source: stackoverflow-php

php/sql – Insert Data into Table with PHP (Bootstrap Form, if that makes a difference)

Bottom line: I don’t know what the hell I’m doing. I just want this comment box to submit information to my database. Let me show you what I got.

<form method="POST" action="post.php" style="font-
 size:200%;padding:50px">
<label for="comments">Comments:</label>
<textarea class="form-control" placeholder="How can I improve?" 
 style="background-color:#fff4c9;border-radius:15px;width:100%;" 
 name="comments" rows="5" id="comments" value=""></textarea> <br>
<button type="submit" class="btn btn-default">Share Your Ideas</button>
</form>`

and then my php i guess????

<?php
if($_SERVER["REQUEST_METHOD"] == "POST") {
$servername = "localhost";
$username = "id1403626_wp_4764008ac42f7398450c24184e47c38a";
$password = "Marshall2";
$dbname = "id1403626_wp_257ecd760342ffcefce424435ed4e776";
//Collect Value of Input Field
$name = $_POST['comments'];
$timestamp = date('Y-m-d H:i:sa');

//Create connection
$connect = mysqli_connect($servername, $username, $password);

//Check connection
if ($connect->connect_error) {
die("So here's the problem...:".$connect->connect_error);
}
//Select Database
mysqli_select_db($connect,$dbname)
or die("Whoops! Can't find that pesky database!");
//Insert Data Query
$sql = "INSERT INTO `Comments`(`comments`, `date`) VALUES ($name, 
$timestamp)";
//What should happen
$result = mysqli_query($connect, $sql);

if($result){
echo 'thank you for your feed back';
}else {
echo "Fuck man I can't code this shit right. If you have a comment email 
it to me at philobythekilo@gmail.com I'ma get this shit working one of 
these days.";
}
}
?>

I just cannot find what I am doing wrong. Help a sista out, please!


Source: stackoverflow-php