Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $db_name = 'db_name';
- $hostname = 'mysql.hostinger.com.br';
- $username = 'username';
- $password = 'password';
- $sql = "INSERT INTO atividade(titulo, descricao, data_atividade) VALUES(:titulo, :descricao, :data_atividade);";
- try {
- $dbh = new PDO('mysql:host=$hostname;dbname=$db_name', $username, $password);
- } catch (PDOException $e) {
- echo 'Error: ' . $e->getMessage();
- }`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement