Reputation: 897
I want to send data to a page using .post(), but the date is not sent, I
puzzle = JSON.stringify(puzzle);
var today = new Date();
$.post("script/add_grid.php",
{Puzzle:puzzle, designer:$("#designer").val(), name: "تجربة 1", creation_date:today});
add_grid.php
$db_word->insert_grid($_REQUEST['Puzzle'],$designer,$name,$creation_date);
I am receiving this error message:
<b>Notice</b>: Undefined index: creation_date in <b>D:\xampp\htdocs\entertainment\script\add_grid.php</b> on line <b>6</b><br />
what might be the solution?
Upvotes: 0
Views: 218
Reputation: 342635
I would assume you are after:
var today = new Date().getTime();
if it is the "now" timestamp that you seek.
Upvotes: 1