Hi, I need to remove the date function on this script
and here is the ajax script for thatPHP Code:<?php
include("config.php");
$name = addSlashes($_POST['name']);
$email = $_POST['email'];
$comment = addSlashes($_POST['comment']);
$date_added = time();
$check = mysql_query("insert into comment(name,email,comment,date_added) values('$name','$email','$comment','$date_added')");
$date_added = date("l j F Y, g:i a",time());
if($check)
echo $date_added;
else
echo "0";
?>
I need to remove Date function on saving into my database.. I don't want to include system date value.. coz I change my data value to auto time_stamp on my phpmyadmin.PHP Code:$.ajax({
type: "POST",
url: "ajax_server.php",
data: "name="+name+"&email="+email+"&comment="+comment,
success: function(date_added){
if(date_added != 0)
{
structure = '<div class="comment_holder"><div id="photo"><img src="images/user.gif" width="60" height="70"><br>'+name+'</div><div id="comment_text"><div id="date_posted">'+date_added+'</div>'+comment+'</div></div>';
$(".no_comments").fadeOut("slow");
$("#ajax_response").prepend(structure);
$(".comment_table").find('textarea, input:text').each(function () {
$(this).val("");
});
}
else
alert("Unexpected error...!");
$("#loading").css("visibility","hidden");
}
});
}
});




Reply With Quote