forked from delongGao/teds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdbconnect.php
21 lines (19 loc) · 934 Bytes
/
dbconnect.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
// ============================== authentication ===============================
//session_start();
//session_regenerate_id();
//if(!isset($_SESSION['user_email'])) // if there is no valid session
//{
// header("Location: index.php?notice=login_first");
//}
// ============================== authentication ===============================
function db_connect (){
// $dbh = new PDO('mysql:host=tedseval.ovid.u.washington.edu;port=52436;dbname=artifactRating', 'root', 'sunfl0w3r', array( // original remote server
// $dbh = new PDO('mysql:host=localhost;port=3306;dbname=artifactRating2', 'root', 'root', array( // 'sunfl0w3r',
$dbh = new PDO('mysql:host=tedsrate.ovid.u.washington.edu;port=3306;dbname=artifactRating2', 'root', 'dongh3d3long', array( // new remote server
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
PDO::ATTR_PERSISTENT => true
));
return ($dbh);
}
?>