This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
try { | |
$pdo = new PDO( | |
'mysql:host=localhost;dbname=test_database', | |
'username', | |
'password', | |
array( | |
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, | |
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_GET['uid']) && isset($_GET['mid'])){ | |
$mailid = (int)$_GET['mid']; | |
$userid = (int)$_GET['uid']; | |
$db = new mysqli_connect('databaseserver', 'databaseuser', 'databasepassword', 'databasename'); | |
$db->query("INSERT INTO mailreaders (mailid, userid) VALUES ($mailid, $userid)"); | |
$im=imagecreatetruecolor(1,1); |