$query = \"INSERT INTO news VALUES (NULL, :param1 , :param2 )\"; $stmt = $pdo->prepare($query); $params = array( \"param1\" => $p[\'title\'], \"param
Use :
$last_insert_id = $pdo->lastInsertId();