try
{
$con = new PDO("mysql:host=".$db_host.";dbname=...");
$inserted = $con->prepare("INSERT INTO table_name(url, title)
VALUES(:url, :title");
$inserted->execute(array(
"url" => $url,
"title" => $title
));
// PDO last inserted ID
$webpage_id = $con->lastInsertId();
}
catch (PDOException $e)
{
echo $e->getFile() . " : " . $e->getLine() . " : " . $e->getMessage();
}
/*
run:
*/