<?php include("connect.php"); include("Includes/view.php"); session_start(); if( !isset($_SESSION['id'])) { header('Location: ../index.php'); } $name = $_SESSION['name']; $queue = $_POST['queue']; //$TarosID = $_POST['TarosID']; //$Status = $_POST['Status']; //$Reason = $_POST['Reason']; $date = date("Y/m/d"); $time = date("H:i:s"); $query = "INSERT INTO sms_traffic_db.table_data (name, date, time, queue) VALUES ('".$name."', '".$date."','". $time."', '".$queue."')"; $result = mysql_query($query) or mysql_error(); if($result) { header('Location: ../main.php'); echo "Data Inserted successfully"; } else { header('Location: ../add_entry.php'); echo "Error" .mysql_error(); } echo '<p>'.$query.'</p>'; mysql_close(); ?>
DATE
DATETIME
TIMESTAMP
time()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)