Config.php
$host = 'REMOVED';
$dbname = 'REMOVED';
$username = 'REMOVED';
$password = 'REMOVED';
try {
$db = new PDO("mysql:host=".$host.";dbname=".$dbname, $username, $password, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
} catch(PDOException $e) {
exit($e->getMessage());
}
The config connects to the server just fine, then I try to insert a row in index.php to the table, and then...
Index.php
require 'config.php';
$text1 = 'teeext';
$text2 = 'teeeext';
$text3 = 'teeeeext';
$db->exec('INSERT INTO users (`row1`, `row3`, `row2`) VALUES ('.$text1.', '.$text2.', '.$text3);
When I run this page, I just get blank, database does not show any rows inserted, even if I run the page 100 times.