WmZilla - Webmaster and Marketplace

The Next Generation Webmaster and Trade Forum

SQLite insert issue

WOLFGANGHASH

New member

0

0%

Status

Offline

Posts

31

Likes

0

Rep

0

Bits

165

3

Months of Service

0%
I am trying to use sqlite with PHP. I have managed to fetch manually added data, but I am having trouble with inserting new data. The code in the image is working fine, it prints 'ok', but it doesn't insert the data. I am working locally on localhost. Here is the code snippet:

```
$db = new SQLite3("selam.db");
if (isset($_POST['lk'])){
$statement = $db->prepare("INSERT INTO notify(model_id, konu) VALUES ('3', 'selam')");
if ($statement) {
echo 'ok';
} else {
echo 'error';
}
}
```
 

249

6,622

6,642

Top