Monday 27 February 2023

How to create crud operation in PHP,MySql

 Establishing a database connection:

  1. class Database { private $host = "localhost"; private $db_name = "mydatabase"; private $username = "root"; private $password = ""; public $conn; public function getConnection() { $this->conn = null; try { $this->conn = new PDO("mysql:host=" . $this->host . ";dbname=" . $this->db_name, $this->username, $this->password); $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch(PDOException $exception) { echo "Connection error: " . $exception->getMessage(); } return $this->conn; } }
  1. Creating a class for CRUD operations:
  1. class Crud { private $conn; private $table_name = "mytable"; public function __construct($db) { $this->conn = $db; } // CREATE public function create($name, $email, $phone) { $query = "INSERT INTO " . $this->table_name . " (name, email, phone) VALUES (:name, :email, :phone)"; $stmt = $this->conn->prepare($query); $stmt->bindParam(":name", $name); $stmt->bindParam(":email", $email); $stmt->bindParam(":phone", $phone); if($stmt->execute()) { return true; } else { return false; } } // READ public function read() { $query = "SELECT * FROM " . $this->table_name; $stmt = $this->conn->prepare($query); $stmt->execute(); return $stmt; } // UPDATE public function update($id, $name, $email, $phone) { $query = "UPDATE " . $this->table_name . " SET name=:name, email=:email, phone=:phone WHERE id=:id"; $stmt = $this->conn->prepare($query); $stmt->bindParam(":id", $id); $stmt->bindParam(":name", $name); $stmt->bindParam(":email", $email); $stmt->bindParam(":phone", $phone); if($stmt->execute()) { return true; } else { return false; } } // DELETE public function delete($id) { $query = "DELETE FROM " . $this->table_name . " WHERE id=:id"; $stmt = $this->conn->prepare($query); $stmt->bindParam(":id", $id); if($stmt->execute()) { return true; } else { return false; } } }
  1. Using the above classes for CRUD operations:
  1. // include database and object files include_once 'config/database.php'; include_once 'objects/crud.php'; // instantiate database and product object $database = new Database(); $db = $database->getConnection(); $crud = new Crud($db); // CREATE if(isset($_POST['create'])) { $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; if($crud->create($name, $email, $phone)) { echo "Record created successfully."; } else { echo "Error: Record creation failed."; } } // READ $stmt


Monday 5 November 2018

How to hack android phone using "Kali Linux Operating System"

Step -1

step-2

step-3

step-4

step-5

step-6

step-7

step-8

>help command

android hack command

*merely for knowledge purposed doesn't hack to anyone android phone

Saturday 4 August 2018

How to know anyone wi-fi password

How to know anyone wi-fi password

  • step-1

          download python software from below link-
          click_here

  • step-2

            copy the below code
            import subprocess

            a = subprocess.check_output(['netsh', 'wlan', 'show', 'profiles']).decode('utf-8').split('\n')
            a = [i.split(":")[1][1:-1] for i in a if "All User Profile" in i]
            for i in a:
            results = subprocess.check_output(['netsh', 'wlan', 'show', 'profile', i, 'key=clear']).decode('utf-              8').split('\n')
            results = [b.split(":")[1][1:-1] for b in results if "Key Content" in b]
            try:
            print ("{:<30}|  {:<}".format(i, results[0]))
            except IndexError:
            print ("{:<30}|  {:<}".format(i, ""))
            a = input("")
  • step-3
         open python software and press CTR+N
         paste the above code
         and press fn+F5 save the file .py extension afte that 
         open the file now you can show wi-fi password
* only for knowledge purpose

Friday 3 August 2018

How to BiPass win7 admin Password

Way 1: Bypass Windows 7 Login Password with Reset Disk

Windows 7 password reset disk is dedicated to resetting or removing Windows 7 password when you forget on login screen. And one reset disk only works for one user account on Windows computer.
1. Start your Windows 7 computer and connect it with password reset disk.
2. Choose the user account on Windows 7 login screen if you know which account the disk is created for.
If not, please try one by one on login screen. Find out the relevant account to remove its login password.
3. Type an incorrect password intentionally for login user and click OK if it is prompted incorrect.
4. Then click on Reset password link under password box to open Password Reset Wizard.
5. Tap on Next and choose the inserted password reset disk. Click on Next.
choose windows 7 password reset disk on wizard
6. Don't type anything in password input field while you are asked to reset password for login user.
follow wizard to remove windows 7 login password
7. Just click Next and Finish, and the Windows 7 login password will be removed.

Way 2: Bypass Windows 7 Login Password in Safe Mode with CMD

By default, built-in administrator is created and set disabled, but has no password protection in Windows computer. While you run Windows 7 computer normally, it will not be found and used. However, if you can run your Windows 7 in safe mode with command prompt, it will run command prompt to remove Windows 7 login password.
In Windows 7 computer, there are 3 different types of safe modes to choose, Safe Mode, Safe Mode with Networking and Safe Mode with Command Prompt. In order to make full use of command prompt to bypass Windows 7 login password, please choose the third one.
start windows 7 in safe mode with command prompt
Step 1: Restart your Windows 7 computer and hold on pressing F8 to enter Advanced Boot Options.
Step 2: Choose Safe Mode with Command Prompt in the coming screen and press Enter.
Step 3: In pop-up command prompt window, type net user and hit Enter. Then all Windows 7 user accounts would be listed in the window. Just find the login user which ever appeared again and again on Windows 7 logon screen.
remove and bypass windows 7 login password in safe mode with command
Step 4: Remove Windows 7 login user password with net user command.
For example, if the login user is "isunshare", just need to type command "net user isunshare *" in command prompt window and press Enter button three times. Then Windows 7 login user password would be removed. Restart computer normally and you could bypass Windows 7 login password to sign in.

Way 3: Bypass Windows 7 Admin Password with Recovery Utility

If all of above methods cannot work for your Windows 7 computer, please think about the third-party Windows 7 password removal tool, iSunshare Windows Password Genius. It can directly remove Windows 7 password for all of user accounts on a locked computer. So it is usually used to remove and bypass Windows 7 admin password to login. Just two easy steps are required to bypass admin password in Windows 7 without login.
Step 1: Burn Windows 7 password reset disk with writable USB flash drive.
The Windows 7 password recovery tool allows anyone to burn a password reset disk on an accessible Windows computer with bootalbe USB drive or CD-ROM.
burn windows 7 password reset disk with USB
  • Insert bootable USB flash drive into accessible computer and run Windows 7 Password Genius.
  • Select the removal device and click Begin burning button.
  • Format the USB flash drive and burn password reset disk into it.
  • Exit USB flash drive after successfully burning.
Step 2: Remove and bypass Windows 7 admin password to login computer.
remove windows 7 admin password
  • Select the login administrator in user list, and click Reset Password button.
  • Click Yes button to confirm to remove Windows 7 admin password.
  • Tab Reboot button to restart locked Windows 7 computer, and eject USB recovery disk in time to boot computer normally from hard drive.
bypass windows 7 administrator password to login
On Windows 7 logon screen, just click the administrator and you could login Windows 7 computer successfully without admin password. It means you have successfully bypassed Windows 7 admin password to access computer.

Sunday 12 February 2017

Technical Knowledge


How to make a welcome audio message in laptop/pc

link for download content-   notpad file 


How to create crud operation in PHP,MySql

  Establishing a database connection: class Database { private $host = "localhost"; private $db_name = "mydatabase&qu...