0

I'm facing a problem with PDO & Access using PHP

I have this code :

$query = "INSERT INTO work (".implode(",",array_keys($_POST)).") VALUES('".implode("','",$_POST)."')";
                                try{

                                $dbNew = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb, *.accdb)}; DBQ=".$dbA."; Uid=; Pwd=;charset=UTF8");
                                $queryaa = $dbNew->prepare($query);
                                $inst = $queryaa->execute();
                                } catch(PDOExepction $e){
                                echo $e->getMessage();
                                }

when i insert data to a MYSQL database , it gets saved correctly like :
Correct Form Of Data

But when i insert to Access database , it gets saved incorrectly as you can see here :

Incorrect Form of Data

So , how can i solve this problem?

Blueblazer172
  • 588
  • 2
  • 15
  • 44
Nizar
  • 13
  • 2

0 Answers0