prepare($sql); $sth->execute(); if ($sth->errorInfo()[0] != "00000" && !empty($sth->errorInfo()[0])) { $answer["message"] = (empty($sth->errorInfo()[2])) ? $sth->errorInfo()[0] : $sth->errorInfo()[2]; exit(json_encode($answer)); } $target_dir = $include_url."uploads/contact/"; $answer["contact_dir"] = $target_dir; $answer["output"] = $sth->fetch(PDO::FETCH_ASSOC); $answer["success"] = 1; exit(json_encode($answer)); ?>