daily pastebin goal
1%
SHARE
TWEET

config

a guest Mar 20th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. function DBCommand ($sqlLine) {
  4.  
  5.     $sql_servername = "sched.rossware.net";
  6.     $sql_username = "Jason";
  7.     $sql_password = "4lGBIzjnwn0rPuOn";
  8.     $sql_database = "JasonDev";
  9.  
  10.     $dsn = "'mysql:host='.$sql_servername.';dbname='.$sql_database';charset=utf8mb4'";
  11.  
  12.     try
  13.     {
  14.         $pdo = new PDO('mysql:host='.$sql_servername.';dbname='.$sql_database,$sql_username,$sql_password);
  15.  
  16.         //echo "Connected successfully";
  17.     }
  18.     catch (PDOException $e)
  19.     {
  20.     echo "Connection failed: " .$e->getMessage();
  21.     }
  22.  
  23.     $stmt = $pdo->prepare($sqlLine);
  24.     $stmt->execute();
  25.  
  26.  
  27.     if ($stmt->rowCount() > 0) {
  28.         $result=true;
  29.         //echo "yes";
  30.     } else {
  31.         //echo "no";
  32.         $result=false;
  33.     }
  34. }
  35.  
  36. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top