Tutorials for Developers & Sysadmins

Step-by-step guides for the work we actually do — Laravel, PHP, WordPress, MySQL, Linux servers, and the occasional rabbit hole. Every command has been run on a real machine; nothing is theoretical.

How to Submit a Form Using jQuery

Submit a form with jQuery by calling $('#form').submit() or .trigger('submit') from your click handler. Includes Bootstrap-modal pattern, requestSubmit, and AJAX…

how7o

How to Store a PHP Array in a MySQL Database

Store a PHP array in MySQL with json_encode() and a JSON column (or TEXT/LONGTEXT). Read back with json_decode($v, true). Includes…

how7o

How to Stop Cron Output (and the Spam Emails)

Stop cron-job output and email spam by redirecting stdout and stderr to /dev/null with >/dev/null 2>&1. Includes errors-only variant and…

how7o

How to Set and Get Cookies with JavaScript

Set, get, and delete cookies with JavaScript using small helpers around document.cookie. Includes once-a-day modal example, modern SameSite/Secure attributes, and…

how7o

How to Set A4 Paper Size in CSS for Print

Set A4 paper size in CSS for printing with @page { size: A4 } and a @media print block sized…

how7o

How to Set a Minimum Length for Phone Numbers in WooCommerce

Enforce a minimum phone-number length in WooCommerce with server-side validation via woocommerce_checkout_process and client-side pattern/maxlength attributes.

how7o

How to Use a Variable as an Object Key in JavaScript

Use a variable as an object key in JavaScript with the ES6 computed-property syntax: { [key]: value }. Includes pre-ES6…

how7o

How to Select the Last Child Element in jQuery

Select the last child with jQuery: $('.parent').children().last() or $('.parent p').last(). Compares :last, :last-child, :last-of-type and shows when each matters.

how7o

How to Select All Text in a Contenteditable Div on Click

Select all text in a contenteditable div on click using the Range + Selection API: createRange, selectNodeContents, getSelection. Includes jQuery…

how7o

How to Scroll to an Element Using jQuery

Scroll to an element with jQuery by animating $('html, body').animate({ scrollTop: $('#target').offset().top }). Includes sticky-header offset and native scrollIntoView.

how7o