Posts

An Online Forum php Code i-Discuss

Image
I-Discuss Online forum Code  Download all files  Download Folder Structure ->img ->partial ---->_handlelogin.php ---->_handleSignip.php ---->db_connect.php ---->footer.php ---->header.php ---->loginModal.php ---->logout.php ----->signupModal.php root ---->about.php ---->contact.php ---->index.php ---->search.php ----->thread.php ---->threadlist.php Database details in last of the page _______________________________________________________ 1) _handleLogin.php code <?php  $showError= false; if($_SERVER["REQUEST_METHOD"] == "POST"){ include 'db_connect.php'; $username=$_POST['username']; $password=$_POST['password']; $sql = "SELECT * from `users` where username ='$username'"; $result = mysqli_query($conn, $sql); $numRows= mysqli_num_rows($result);   if($numRows ==1){   $row = mysqli_fetch_assoc($result);   if(password_verify($password, $row['passwor...

Making A Notes maker with Php

Image
Making A notes Maker with PHP All Files link- Download index.php code <?php   // INSERT INTO `notes` (`sno`, `title`, `description`, `tstamp`) VALUES (NULL, 'But Books', 'Please buy books from Store', current_timestamp()); $insert = false; $update = false; $delete = false; // Connect to the Database  $servername = "localhost"; $username = "root"; $password = ""; $database = "notes"; // Create a connection $conn = mysqli_connect($servername, $username, $password, $database); // Die if connection was not successful if (!$conn){     die("Sorry we failed to connect: ". mysqli_connect_error()); } if(isset($_GET['delete'])){   $sno = $_GET['delete'];   $delete = true;   $sql = "DELETE FROM `notes` WHERE `sno` = $sno";   $result = mysqli_query($conn, $sql); } if ($_SERVER['REQUEST_METHOD'] == 'POST'){ if (isset( $_POST['snoEdit'])){   // Update the record     $sno = $_POST[...