Skip to content

Utshaw/BUET-Interplanetar-Website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Team Interplanetar logo

Hosting

  • Add dbconnection.php file inside model directory
    File format(dbconnection.php):
<?php
class DBConn {

    private $servername;
    private $username;
    private $password;
    private $dbname;
    private $charset;
    public function connect() {
        $this->servername = "<servername>";
        $this->username = "<username>";
        $this->password = "<password>";
        $this->dbname = "<db_name>";
        $this->charset = "utf8mb4";
        try {
            $dsn = "mysql:host=".$this->servername.";dbname=".$this->dbname.";charset=".$this->charset;
            $pdo = new PDO($dsn, $this->username, $this->password);
            $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
            return $pdo;
        } catch (PDOException $th) {
            $error_msg = "Connection failed: " . $th->getMessage();
        }
    }

}
  • servername is either localhost or the "Shared IP Address" found in cPanel's main menu's right section
  • Upload the full repository contents inside public_html

ForTheBadge built-with-love by Utshaw

About

Website of Team Interplanetar from Bangladesh University of Engineering and Technology(BUET)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published