Hi
I inserted date into database in date picker ( i mean calender) format… In MySql its type is Date…
I can insert the date in correct format… But when Iam editind the Date in calender… Its saved as 0000-00-00…
It cannot update in correct format… Pls help me
This is my code… In this C Date and Payement Date…
Please help me for this…
[php]<?php
error_reporting(0);
session_start();
if(!isset($_SESSION[‘admin’])){
echo “”;
}
include("…/includes/dbconnect.php");
$id=$_GET[‘id’];
if(isset($_POST[‘submit’]))
{
$date=$_POST[‘txtDate’];
$advancedpaid=$_POST[‘advancedpaid’];
$paymentdate=$_POST[‘txtDate1’];
$hid=$_POST[‘id’];
$sqlQry =mysql_query(“UPDATE bookdetails
SET date
= ‘$date’,advancedpaid
= ‘$advancedpaid’,paymentdate
= ‘$paymentdate’ where id=’$id’”);
{
$m=“
Updated Successfully
”;}
}
?>
<?php if(isset($m)) echo $m;?> |
Booking Form | ||
---|---|---|
C Date: | ||
Advanced Paid: | Select Yes No | <?php include("../includes/dbconnect.php"); $sq=mysql_query("select * from bookdetails"); ?>