Subversion Repositories SmartDukaan

Rev

Rev 13253 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13253 Rev 13254
Line 38... Line 38...
38
      $db_pass = "shop2020";
38
      $db_pass = "shop2020";
39
      if(!isset($dbh)){
39
      if(!isset($dbh)){
40
        try{
40
        try{
41
          $dbh = new PDO("mysql:host=$server;dbname=$database",$db_user,$db_pass,array(PDO::ATTR_PERSISTENT => true));
41
          $dbh = new PDO("mysql:host=$server;dbname=$database",$db_user,$db_pass,array(PDO::ATTR_PERSISTENT => true));
42
          $sql = "INSERT INTO campaigns VALUES('".$_POST['userEmail']."',1)";
42
          $sql = "INSERT INTO campaigns VALUES('".$_POST['userEmail']."',1)";
-
 
43
          error_log("campaign_sql ".$sql);
43
          $dbh->exec($sql);
44
          $dbh->exec($sql);
44
        }catch(Exception $ex){
45
        }catch(Exception $ex){
-
 
46
          error_log("Couldn't connect to db");
45
            // echo "Internal Error, please try again later!";
47
            // echo "Internal Error, please try again later!";
46
        }
48
        }
47
      }      
49
      }      
48
    }
50
    }
49
  }
51
  }