Take the 2-minute tour ×  This problem is driving me crazy, i
tried everything. Is does not give me any error, but it does not
insert anything to the database either. Database connection is
good, and there should be no typos. Please take a look, and see
if you can find the problem:  $err = array();       $ip =
gethostbyname($_SERVER['REMOTE_ADDR']);     $date = "2012-02-02
02:02:02"; //Example     $uploader_name =
$_POST['uploader_name'];      // Validation happens here...
if (empty($err)) {          $host = "host";         $dbname =
"db";         $user = "user";         $pass = "pass";
try {              $sql = "INSERT INTO `table` (`ip`, `date`,
`uploader_name`)                      VALUES (:ip, :date,
:uploader_name)";              # the data we want to insert
$params = array(                 ':ip' => $ip,
':date' => $date,                 ':uploader_name' =>
$uploader_name               $dbh = null;          }
catch(PDOException $pe) {             die('SQL Error