PHP
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 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
"; } } ?> Admin
<?php include("header.php"); ?>
<?php include("left.php"); ?>
<?php
$sel_news=mysql_query("select * from bookdetails where id=$id");
$got_news=mysql_fetch_array($sel_news);
$rowid=$got_news['id'];
$date = $got_news['date'];
$advancedpaid = $got_news['advancedpaid'];
$paymentdate=$got_news['paymentdate'];
?>
<?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"); ?>