how do i send all item id at once through url success.php?id=

As i add some items in the cart i cant change the status in the database from “ADDED TO CART ” to “CONFIRMED”

<!DOCTYPE html>
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
require 'includes/common.php';

if (!isset($_SESSION['email']))
    header('location: index.php');
        <link rel="stylesheet" href="" >
    <!--jQuery library-->
    <!--Latest compiled a>
        <meta charset="UTF-8">nd minified JavaScript-->
    <link href="style.css" rel="stylesheet" type="text/css"/>
        <title>Lifestyle Store | Products</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <body >
        include 'includes/header.php';
        //changed from above user_id to $_getc ['user_id']
        $items_query="SELECT,,items.price from items INNER JOIN user_items INNER JOIN users ON AND WHERE user_items.user_id= $user_id AND user_items.status='Added To Cart'";
        // chaged from select * from user_items inner join items on where$user_id";
        $items_query_result= mysqli_query($con, $items_query) or die(mysqli_error($con));
       <?php  if (mysqli_num_rows($items_query_result)==0){ ?> 
       <?php echo 'Add something in cart';  }  else  { ?>
</div> </div> <?php }?> <?php include 'includes/footer.php'; ?> </body> </html>
  1. this is the code for a shopping cart
  2. user add some this in the cart
  3. **then when the user goes to the cart the cart displays all the items with their ids, name and the price **
  4. and finally the total price
  5. **i have defined a while loop to sum up the price and to display the id name etc **
  6. now i want to send the item id to the success.php to change the status in the database from "Added To Cart " to "Confirmed"
Source: stackoverflow-php

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.


include 'confi.php';


    $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);
        $json = array("status" => 1, "msg" => "success!");
        $json = array("status" => 0, "msg" => "error!");


/* 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')";


Error: INSERT INTO website (id, username, password, email, timestamp, balance, rank, banned, color, ts3, minecraft, ‘ip’)VALUES (”, ‘FlareCO’, ‘ilovepokemongoeveryday’, ‘’, ‘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’, ‘’, ‘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-
<label for="comments">Comments:</label>
<textarea class="form-control" placeholder="How can I improve?" 
 name="comments" rows="5" id="comments" value=""></textarea> <br>
<button type="submit" class="btn btn-default">Share Your Ideas</button>

and then my php i guess????

$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
or die("Whoops! Can't find that pesky database!");
//Insert Data Query
$sql = "INSERT INTO `Comments`(`comments`, `date`) VALUES ($name, 
//What should happen
$result = mysqli_query($connect, $sql);

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 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