here I have a date of the java string era, and I want to compare and add data to SQL that gives a parsing error, does not know why any solution ..
<?php
if($_SERVER['REQUEST_METHOD']=='POST'){
$number = $_POST['number'];
$type = $_POST['type'];
$date = $_POST['date'];
$content = $_POST['content'];
$start = strtotime("now");
$end = strtotime("-7 days");
while($start->format('U') > $date->format('U') > $end->format('U')){
$sql = "INSERT INTO message_detail (number,type,date,content) VALUES ('$number','$type','$date','$content')";
require_once('connect.php');
if(mysqli_query($con,$sql)){
echo 'Entry Added Successfully';
}else{
echo 'Could Not Add Entry';
}
}
mysqli_close($con);
}
?>
source
share