Posts

How to Make Fees Receipt in PHP Using Mysql Database

Image
  In this article, you will learn How to Make Fees Receipt in PHP Using Mysql Database. index.php <html> <title>Add fees</title> </head> <body> <h1><a href="add.php">Add receipt</a> &nbsp &nbsp &nbsp <a href="search.php">Record</a></h1> <form method="POST" oninput="x.value=parseInt(a.value)+parseInt(b.value)+parseInt(c.value)" action="fees.php"> <input type="date" name="date"><br/><br/> Name <input type="text" name="name"><br/><br/> Registration No. <input type="number" name="rno"><br/><br/> Course <select name="course"> <option>Select Course</option> <option value="PHP">PHP</option> <option value="JAVA">JAVA</option> <option value="ACCOUNTS

How to Create a Login system in PHP Using a Session

Image
In this article, we will explain how to create a login system in PHP using a session. ['username']!=$username && $row['password']!=$password) { $error="<p>Wrong User Name and Password</p>"; } if(isset($error)) { echo $error; } else{ require('db.php'); session_start(); $result =mysql_query("select * from users where username='$username' and password='$password'"); while($row=mysql_fetch_array($result)) { $_SESSION['username']=$row['username']; echo"<script>window.location.href='../invoice/'</script>"; } } } ?> db.php <?php mysql_connect('localhost','root',''); mysql_select_db('testbill'); ?>  

How to Fetch Data From Mysql Database using PHP

Image
  How to Fetch Data From Mysql Database using PHP, from inserted data in Mysql database. HTML Code <div class="table"> <div class="tab1"><h1>Name</h1></div> <div class="tab1"><h1>Father name</h1></div> <div class="tab1"><h1>Mother name</h1></div> <div class="tab1"><h1>E-mail</h1></div> <div class="tab1"><h1>Address</h1></div> <div class="tab1"><h1>DOB</h1></div> <div class="tab1"><h1>Category</h1></div> <div class="tab1"><h1>Image</h1></div> <div class="tab1"><h1>Action</h1></div> <div class="tab1"><h1>Delete</h1></div> <?php $query1 = "select * from table"; $query2 = mysql_query($q

How to Insert Data into Mysql Database using PHP

Image
In this tutorial, we will explain How to insert data into Mysql database using  PHP . If you want to save the record in one place then insert the data into the database. Below Steps: index.php <form method="post" action="insert.php" enctype="multipart/form-data"> <div class="name"> <div class="name1"><h1>Student Name:</h1></div> <div class="name2"><input type="text" name="name" value="" /></div> </div> <div class="name"> <div class="name1"><h1>Father Name:</h1></div> <div class="name2"><input type="text" name="father_name" value="" /></div> </div> <div class="name"> <div class="name1"><h1>Mother Name:</h1></div> <div class="name2"><input type="text

How to Create Input using JAVA

Image
In this article, you will learn How to Create Input using JAVA. It works like in  HTML  and  PHP Example:- import java.util.Scanner; // import the Scanner class class MyClass { public static void main(String[] args) { Scanner myObj = new Scanner(System.in); String userName; System.out.println("Enter username"); userName = myObj.nextLine(); System.out.println("Username is: " + userName); } }  

How to Create Inheritance in JAVA

Image
In this article, you will learn How to Create Inheritance in  JAVA . Example:- class Vehicle { protected String brand = "Samsung"; public void honk() { System.out.println("Mobile, LED!"); } } class Car extends Vehicle { private String modelName = "Galaxy"; public static void main(String[] args) { Car myFastCar = new Car(); myFastCar.honk(); System.out.println(myFastCar.brand + " " + myFastCar.modelName); } }  

How to Create Polymorphism in JAVA

Image
  In this article, you will learn How to Create Polymorphism in  JAVA . Example:- class Animal { public void animalSound() { System.out.println("The animal makes a sound"); } } class Pig extends Animal { public void animalSound() { System.out.println("The pig says: wee wee"); } } class Dog extends Animal { public void animalSound() { System.out.println("The dog says: bow wow"); } } class MyMainClass { public static void main(String[] args) { Animal myAnimal = new Animal(); Animal myPig = new Pig(); Animal myDog = new Dog(); myAnimal.animalSound(); myPig.animalSound(); myDog.animalSound(); } }