Closed Samadhan1012 closed 7 years ago
I have added date field into add record form. I want to add current date into field. But it's just adding 00/00/0000 in table. Index.html: `
**add.php:** $lastvisit = $mysqli->real_escape_string(strip_tags($_POST['lastvisit'])); if ( $stmt = $mysqli->prepare("INSERT INTO ".$tablename." (name, lastvisit, firstname) VALUES ( ?, ?, ?)")) { $stmt->bind_param("sss", $name, $lastvisit, $firstname);`
**add.php:**
I have added date field into add record form. I want to add current date into field. But it's just adding 00/00/0000 in table. Index.html: `
**add.php:**
$lastvisit = $mysqli->real_escape_string(strip_tags($_POST['lastvisit'])); if ( $stmt = $mysqli->prepare("INSERT INTO ".$tablename." (name, lastvisit, firstname) VALUES ( ?, ?, ?)")) { $stmt->bind_param("sss", $name, $lastvisit, $firstname);`