Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Connecting to database
- public function connect() {
- require_once 'include/Config.php';
- // Connecting to mysql database
- $this->conn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);
- $this-> conn->set_charset("utf8");
- // return database handler
- return $this->conn;
- }
- $stmt->bind_param("ssssssssssssssss", $name, $father_name, $gender, $age, $dob, $cnic, $phone_no, $address, $email, $encrypted_password, $salt, $roll_no, $session, $section, $semester, $shift);
- $result = $stmt->execute();
- $stmt->close();
- create table users(
- id int(11) primary key auto_increment,
- /** unique_id varchar(23) not null unique, **/
- name varchar(50) not null,
- fahter_name varchar(50) not null,
- gender varchar(7) not null,
- age varchar(3) not null,
- dob varchar(15) not null,
- cnic varchar(100) not null,
- phone_no varchar(100) not null unique,
- address varchar(50) not null,
- email varchar(100) not null unique,
- encrypted_password varchar(80) not null,
- salt varchar(10) not null,
- roll_no varchar(50) not null,
- session varchar(50) not null,
- section varchar(2) not null,
- semester varchar(2) not null,
- shift varchar(50) not null,
- created_at datetime,
- updated_at datetime
Add Comment
Please, Sign In to add comment