HS Banner
HS Codebank Articles
Page 1 of 2

PHP Form Validation 01/28/2024

Description:

Think SECURITY when processing PHP forms! This shows how to process PHP forms with security in mind. Proper validation of form data is important to protect your form from hackers and spammers!

Author: Admin
Language: PHP
Tags: php security forms
Read More24

Add a new item to an array, it can be inserted with the help of array_splice() a function of PHP. 09/09/2023

Description:

This function removes a portion of an array and replaces it with something else. If offset and length are such that nothing is removed, then the elements from the replacement array are inserted in the place specified by the offset.

Author: Admin
Language: PHP
Tags: array php insert array_splice
Read More85

User-defined functions 07/08/2023

Description:

User-defined function are used to preform task in PHP code like saving a user's form input to a database.

Author: Admin
Language: PHP
Tags: functions php
Read More90



PHP Crypt 02/11/2023

Description:

crypt() will return a hashed string using the standard Unix DES-based algorithm or alternative algorithms. password_verify() is compatible with crypt(). Therefore, password hashes created by crypt() can be used with password_verify().

Author: Admin
Language: PHP
Tags: php crypt hash password
Read More108

HTML Datetime Input Box 05/15/2022

Description:

Here's some code to set the default datetime for an input box with its type set to datetime-local using HTML and PHP.

Author: Admin
Language: PHP
Tags: input datetime-local php html
Read More356

PHP File Upload 03/11/2022

Description:

Here's some sample code to upload a file using PHP.

Author: Guitarman
Language: PHP
Tags: php uplaod file
Read More731

Example of .htaccess for PHP 10/06/2021

Description:

A .htaccess (hypertext access) file is a directory-level configuration file supported by several web servers, used for configuration of website-access issues, such as URL redirection, URL shortening, access control (for different web pages and files), and more. The 'dot' (period or full stop) before the file name makes it a hidden file in Unix-based environments.

Author: Admin
Language: HTTP
Tags: html .htaccess php
Read More975



Webserver Class 04/15/2021

Description:

This is a simple http webserver class I found years ago.

Author: Guitarman
Language: C#
Tags:
Read More367

Redirect HTTP to HTTPS on IIS 04/10/2021

Description:

Add this to your web.config file to redirect users to HTTPS on IIS web servers. (ASP.Net and PHP)

Author: Guitarman
Language: HTML, XML
Tags:
Read More280

SHA512 Class 03/30/2021

Description:

This is the SHA512 HASH using the System.Security.Cryptography.HashAlgorithm.

Author: Admin
Language: C#
Tags: sha512
Read More305