Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function DBCommand ($sqlLine) {
- $sql_servername = "sched.rossware.net";
- $sql_username = "Jason";
- $sql_password = "4lGBIzjnwn0rPuOn";
- $sql_database = "JasonDev";
- $dsn = "'mysql:host='.$sql_servername.';dbname='.$sql_database';charset=utf8mb4'";
- try
- {
- $pdo = new PDO('mysql:host='.$sql_servername.';dbname='.$sql_database,$sql_username,$sql_password);
- //echo "Connected successfully";
- }
- catch (PDOException $e)
- {
- echo "Connection failed: " .$e->getMessage();
- }
- $stmt = $pdo->prepare($sqlLine);
- $stmt->execute();
- if ($stmt->rowCount() > 0) {
- $result=true;
- //echo "yes";
- } else {
- //echo "no";
- $result=false;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement