Skip to main content

Posts

Showing posts from October, 2022

How to Retrieve Image In PHP and PDO

  In this tutorial ,we will learn how to retrieve the image from php and pdo. First ,we need to create two empty files for php dbconfig.php fetchimg.php CREATE FILE dbconfig.php: <?php $hostname = "localhost"; $username = "root"; $password = ""; try { $conn = new PDO("mysql:host=$hostname;dbname=databasename", $username, $password); // set the PDO error mode to exception $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); //echo "Database connected successfully"; } catch(PDOException $e) { echo "Database connection failed: " . $e->getMessage(); } ?> CREATE FILE fetchimg.php <?php include 'dbconfig.php'; $result = $conn->prepare("SELECT images FROM images ORDER BY id DESC"); $result->execute(); $fetch = $result->fetchAll(PDO::FETCH_ASSOC); ?> <div class="container"> <div clas...

How To Add A Contact Form In Blogger Website

  In this tutorial, we will learn how you can add a contact form to your blogger website easy to copy my code and paste it or generate the code on this link. In every website, the contact form is the only way helps to visitors send messages and what they need and attach messages directly from your website. Read also: How to create python program to fetch and display the data from sql server database Python Flask tutorial Setting up a Flask and SQL Database Connection   How to create a python flask with mysql database  Python Flask Student List CRUD System Using MySQL Database for Beginners   This contact form is not for only the contact us page you also like to use services pages , interest bloggers users to connect your account for writing services, use for Marketing services , etc. and so, users can contact you directly without typing the email id on the android email app or email websites.   Easy steps to add a contact form in blogger: First, sign in...

How to fetch data from a database using Php Ajax

In this tutorial, we will learn how to fetch data from a database using php and ajax, and previous article we will learn to insert data in the database using php and ajax .     ok, Let's create empty php files, config.php fetchdata.php viewdata.php  Database Table: CREATE TABLE student ( id int(11) NOT NULL PRIMARY KEY, name varchar(100) NOT NULL, email varchar(50) NOT NULL, mobileno varchar(100) NOT NULL, city varchar(50) NOT NULL ) config.php $hostname = "localhost"; $username = "root"; $password = ""; try { $conn = new PDO("mysql:host=$hostname;dbname=studentresults", $username, $password); // set the PDO error mode to exception $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); //echo "Database connected successfully"; } catch(PDOException $e) { echo "Database connection failed: " . $e->getMessage(); } CREATE fe...

php code for a student results management system using PHP and PDO

In this tutorial, we will learn how to create a php code for a student results management system using PHP and PDO. We need to create an HTML code to prepare a student result sheet with HTML and a bootstrap framework for designs. We have to build a website to carry the HTML code and get the details and show the result like pass or fail and where you can upload the student data in insert.php page like student name, class, marks in different subjects English, Tamil, Hindi, computer, history, science and one more add the total and pass or fail implementation finalize.   $ads={1} First, we need to create a empty php files dbconfig.php index.php savedata.php fetch.php fetchprocess.php And then, create a database and I already created and named as "studentresults".    Read also: PHP CRUD MYSQLI Operations tutorial for Begginers     How to Filter Table in Active or Inactive Status in PHP    PHP File Upload      PHP connect to MySQL Database...