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

If autocomplete is on in the browser, the input value is filled automatically based on the previously entered values. The autocomplete feature mostly works for the username, email, and password inputs which are saved in the browser. It is possible to turn off autocomplete for form or specific input fields. The autocomplete attribute helps to specify whether form inputs should have autocompletion on or off.

By: CodexWorld Jul 4, 2023

When the input is given by the user, it is always a good idea to filter and validate the input before processing. You can filter input string as per the required data type with PHP. In this example code, we will show you how to get only alphanumeric characters from string in PHP. Use PHP preg_replace() function to remove everything except a-z, A-Z, and 0-9 from the string.

By: CodexWorld Jun 23, 2023

Generally, a text input element is used in the HTML forms to accept the user’s input. The user can input alphanumeric and special characters in this text input field. In some specific cases, you are required to allow the user to input only alphabets, and restrict them to input numeric and special characters. In this example code snippet, we will show you how to allow only alpha letters or characters in the input element with HTML.

By: CodexWorld Jun 22, 2023
PHP

String encryption functionality is used to make sensitive information safe in the web application. With the encryption feature, the original string is encrypted with Salt/Key and stored. Later the encrypted string is decrypted by the Salt/Key that is used at the time of encryption. The encryption and decryption algorithm can be implemented with a salt key using PHP.

By: CodexWorld May 19, 2023

The display property is used to control the visibility of HTML elements with CSS. Sometimes we may require to change the visibility of elements dynamically in JavaScript. The element ID or class can be used to select and Show/Hide DIV using JavaScript. Use the Document:getElementsByClassName() method to show and hide element by class name using JavaScript.

By: CodexWorld Apr 21, 2023

Generally, the selected checkbox values are returned in an array on HTML form submission. You can also get the checked checkbox values without form submission using jQuery. If you don’t want to use the server-side script to get the checkbox values, jQuery is an easy option to get the values from the selected checkboxes at the front-side script. Use jQuery map() function with join() method to get values from checked checkbox values separated by comma.

By: CodexWorld Apr 13, 2023

The PayPal Sandbox account is used by the developer to test the payment process before making the PayPal payment gateway live for production use. The NVP/SOAP API Credentials are required to test the PayPal Payments Pro transaction on the Sandbox environment. In this tutorial, we will show you how to create a PayPal Pro sandbox business account and get NVP/SOAP Sandbox API Credentials.

By: CodexWorld Mar 16, 2023
keyboard_double_arrow_up