Posts

Showing posts from December, 2021

How to use HTML5 Form Controls in PHP

Image
 Using HTML5 Form Controls in PHP     This article shows you how to use html5 form controls in the form and read their values in  PHP. There are many controls newly introduced in html5. Some form controls you will learn in this tutorial such as number, tel, url, email, date, time etc. The following examples show you how to use different type of form fields.  There two files in each example, one is HTML and the other one is PHP file. Both the files save in some folder in the server(xampp/wampp) and run the HTML file in a browser. When it is open, enter the data and submit the form. You will see the result  as shown below the PHP file. Example1 - A form using get Example2 - A form using post Example 1:  The below example show you how to submit form with get method. html5demo.html <!DOCTYPE html> <html> <head> <title> html5 Form </title> </head> <body> <form action= "html5demo.php" autocomplete= "on" name= "fo

Java Exceptions Tutorial

Image
Exceptions in Java - Notes     Table of Contents Types of Exceptions A program without Exception A program with try-catch One try and multiple catch blocks Nested try-catch Use of printStackTraceMethod  User Defined Exceptions   Practice Quesstions on Java Exceptions   Introduction Basically, errors are two types in programming development. Syntactical errors (Grammatical errors) occurs at compile time.  Semantic errors (Logical errors) occurs at runtime.      What is an Exceptio n? Exception is nothing but a runtime error. Handling exception is called Exception Handling Exception is a some abnormal condition that occur during the execution of the program. Exception handler traps the runtime errors and makes the program execute smoothly and completely without any interruption.      Exception superclass is ------ Throwable. It is available in java. lang package.    Throwable again subdivided into 2 classes 1 . Error Class   – These are hardware related errors. Also called as