PHP

DataTables server-side processing is used to fetch data from the database and list them in a tabular view. In most cases, the single database table is used in DataTables with server-side processing. The SSP class gives you the possibility to JOIN multiple tables with DataTables server-side processing. You can apply the LEFT or INNER JOIN clause to the SQL query in server-side processing.

By: CodexWorld Mar 9, 2024
PHP

There are various options available to get the content from the URL in PHP. You can get the file content from a remote URL using PHP. PHP file_get_contents() function is the easiest way to parse the content from a web URL. To use the file_get_contents() function, the allow_url_fopen directive must be enabled in the PHP configuration file (php.ini).

By: CodexWorld Oct 31, 2023

The javascript:void(0); attribute is used in the anchor tag for empty links. It helps to prevent the default behavior of href links. But, JavaScript Void 0 may not work well for some JS frameworks (Angular, Backbone.js, etc) and SPA sites. Also, the content security policy (CSP) does not support javascript:void(0) in the application. Use the “#!” in the href attribute of the <a> tag for empty links.

By: CodexWorld Oct 25, 2023
PHP

In general, we use the date() function to get date and time in PHP. It returns the time based on the timezone set in the PHP server. You can get the DateTime from the timezone set as default on the PHP configuration. In this example code, we will show you how to get the current time by given a timezone in PHP. You can get and display the current Date and Time from a specific timezone using PHP.

By: CodexWorld Oct 2, 2023
PHP

Saving dynamic page content in a static HTML file functionality is used for many purposes, page caching system is one of them. In the caching system, the dynamic data is stored in an HTML file and displays the content from the HTML file to make the page load faster. In this example code snippet, we will show you how to save output of a PHP file in an HTML file and store dynamic page content in an HTML file using PHP.

By: CodexWorld Aug 30, 2023

The window.print() method is the easiest solution to print HTML content in JavaScript. The Window print() method opens the browser’s default print dialog to print the current document. You can use this method to print dynamic HTML content using JavaScript. By default, the page orientation is set to portrait in the print dialog. You can change page orientation in the print dialog by adding CSS to the document header.

By: CodexWorld Aug 16, 2023

Whenever a form is submitted or completed a task, the status message is displayed on the web page. It will be a great idea to hide the message DIV after some seconds automatically from the element. Use fadeTo() method to hide DIV element after some time interval using jQuery. Not only DIV element, you can autohide any HTML element after few seconds in jQuery.

By: CodexWorld Aug 2, 2023

It’s always recommended for developers to use dynamic year in the copyright section so that the year can be changed automatically and updated with the current year. You can get the current year and add the dynamic year in HTML using JavaScript. Create a Date object and call the getFullYear() method to get the current year in JavaScript.

By: CodexWorld Jul 24, 2023

It’s always a good idea to add client-side validation before uploading file to the server. The client-side validation adds a great user experience to the file upload section. The file size validation can be added to the file upload field using JavaScript and jQuery. In this example code snippet, we will show you how to validate file size while uploading file using jQuery or JavaScript.

By: CodexWorld Jul 7, 2023
keyboard_double_arrow_up