Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Front End Technology Articles
Page 567 of 652
Online Group Chat application Using PHP
A web-based online group chat application enables users to communicate in real-time through text messaging. This tutorial demonstrates how to build a complete group chat application using PHP, MySQL, and Bootstrap for a modern interface. Prerequisites Installation Requirements: XAMPP or WAMP server with PHP support MySQL database Web browser for testing Step 1: Database Setup First, create the database and table structure for storing chat messages − CREATE DATABASE onlinechatapp DEFAULT CHARACTER SET utf8; GRANT ALL ON onlinechatapp.* TO 'admin'@'localhost' IDENTIFIED BY 'admin'; USE onlinechatapp; CREATE TABLE ...
Read MoreSimple Contact Form using HTML CSS and PHP
A contact form is a great way to allow users to reach out to you directly through your website. Contact forms are a crucial aspect of any website, as they allow visitors to get in touch with the website owner. A contact form on website provides an easy way for visitors to ask questions, make inquiries, or provide feedback. In this tutorial, we will be discussing how to create a simple contact form using HTML, CSS, and PHP. Step 1: Create the HTML Form The first step in creating a contact form is to create its structure ...
Read MorePHP timestamp to HTML5 input type=datetime element
HTML5 datetime input elements require a specific format: YYYY-MM-DDTHH:MM:SS. In PHP, you can convert timestamps to this format using the date() function with the appropriate format string. Basic DateTime Format To format the current timestamp for HTML5 datetime input − 2024-03-28T19:12:49 Converting Specific Timestamp To convert a specific Unix timestamp to HTML5 datetime format − 2022-01-01T00:00:00 HTML Integration Using the formatted timestamp in an HTML datetime input element −
Read MoreWhat are the differences between JavaScript and PHP cookies?
Cookies are text files stored on the client's browser to remember user information across web pages. Both JavaScript and PHP can work with cookies, but they operate differently − JavaScript handles cookies on the client-side while PHP manages them on the server-side. JavaScript Cookies JavaScript cookies are manipulated directly in the browser using the document.cookie property. They're ideal for client-side data storage and immediate user interactions. Setting a Cookie with JavaScript // Set a cookie that expires in 7 days document.cookie = "username=john; expires=" + new Date(Date.now() + 7*24*60*60*1000).toUTCString() + "; path=/"; Reading ...
Read MoreDifference between != and !== operator in JavaScript Program
In JavaScript, != and !== are both inequality operators, but they differ in how they compare values. != performs type coercion (converts types before comparing), while !== performs a strict comparison (checks both value and type without conversion). != (Loose Inequality) The != operator checks if two values are not equal after type conversion. It converts the operands to the same type before comparing their values. For example, 1 != '1' returns false because after converting the string '1' to number 1, both values are equal. !== (Strict Inequality) The !== operator checks if two values ...
Read MoreDifference between dot (.) and hash(# )selector in CSS
In CSS, the dot (.) and hash (#) selectors are used to apply styles to HTML elements. The dot selector targets elements by their class attribute, while the hash selector targets a specific element by its id attribute. Dot (.) Selector − Class Selector The . (dot) selector is a class-level selector. It creates a style class that can be applied to multiple HTML elements. Any element with the matching class attribute will receive the style. .blackBorder { border: 2px solid black; } This style applies to every element that ...
Read MoreDifference between :focus and :active selector in HTML
In CSS, :focus and :active are pseudo-class selectors that apply styles based on user interaction. They are commonly used on buttons, links, and form elements but trigger at different moments of interaction. :focus Selector The :focus selector applies styles when an element receives focus − either by clicking on it or navigating to it using the Tab key. The focus remains on the element until another element receives focus. This is commonly used on form inputs, buttons, and links. :active Selector The :active selector applies styles when an element is being actively pressed (mouse button is ...
Read MoreDifference between HTML and HTML 5
HTML (HyperText Markup Language) is a markup language used to define the structure of web pages using tags. HTML5 is the latest major version of HTML, introducing native support for audio, video, graphics, offline storage, and many new semantic elements that eliminate the need for third-party plugins like Flash. HTML (Older Versions) Earlier versions of HTML (HTML 4.01 and below) provided basic document structuring with tags for text, images, links, tables, and forms. They relied on external plugins (like Flash) for multimedia and had limited client-side storage (only cookies). The doctype declaration was long and complex. HTML5 ...
Read MoreHow to check if onClick exists on element in jQuery?
In jQuery, you can check if an onClick event handler exists on an element by accessing the events data stored internally by jQuery. This is useful when you need to verify if event listeners are attached before adding or removing them. Checking for Click Events Using $.data() The most reliable way to check for existing click events is to use jQuery's $.data() method to access the events object. Here's how you can do it − Check onClick Events ...
Read MoreHow do I remove a property from a JavaScript object?
To remove a property from a JavaScript object, use the delete keyword. The delete operator removes a property from an object and returns true if the deletion was successful. Using the delete Operator The delete operator is the most common way to remove properties from JavaScript objects. Here's the basic syntax − delete objectName.propertyName; // or delete objectName['propertyName']; Example You can try to run the following code to learn how to remove a property − var cricketer = { name: "Amit", rank: 1, ...
Read More