Skip to content

WebCheatSheet

The easy way to know

  • PHP
  • HTML
  • JavaScript
  • SQL
  • ASP
  • MS Access Functions
  • SaaS
  • Email
PHP

Pass Controller Data to a PHP MVC View

Sergey KornilovOctober 10, 2026

Let a PHP controller validate request data, call the model, and pass an explicit view-data array to a template.

PHP

Recover from MySQL Server Has Gone Away Before a Transaction

Sergey KornilovOctober 10, 2026

Refresh an idle PHP PDO connection before starting a MySQL transaction, while avoiding unsafe retries after writes begin.

PHP

Set the PHPMailer Envelope Sender Correctly

Sergey KornilovOctober 10, 2026

Set the visible From address and SMTP envelope sender separately in PHPMailer without manually adding a Return-Path header.

SQL

Speed Up SQL Server JDBC Batch Inserts with Bulk Copy

Sergey KornilovOctober 10, 2026

Enable the Microsoft JDBC driver bulk-copy path for compatible prepared batch inserts and measure the result safely.

PHP

Reject NUL Bytes Before Saving PostgreSQL Text with PHP

Sergey KornilovOctober 10, 2026

Detect NUL bytes in PHP before inserting text into PostgreSQL, and use bytea when the value is truly binary data.

PHP

Fix Local PHP Asset 404 Errors by Setting the Document Root

Sergey KornilovOctober 9, 2026

Make local CSS, SVG, and image URLs match production by starting the PHP development server with the correct public document root.

JavaScript

Call a Server Route from an HTML Button with Fetch

Sergey KornilovOctober 9, 2026

Use an HTML button and the Fetch API to send an item ID to a server route instead of trying to call a Python or PHP function directly from onclick.

JavaScript

Fix “prompt() Is Not Supported” in JavaScript

Sergey KornilovOctober 9, 2026

Run window.prompt in an actual browser page or replace it with an HTML input when the JavaScript host does not support browser dialogs.

SQL

Back Up SQL Server to a Network Share Without Access Denied Errors

Sergey KornilovOctober 9, 2026

Grant the SQL Server Database Engine service identity access to a UNC share before running BACKUP DATABASE from SSMS or a maintenance plan.

PHP

Enable PHP Session Strict Mode and Regenerate IDs Safely

Sergey KornilovOctober 9, 2026

Enable PHP session strict mode, secure the session cookie, and regenerate the ID after authentication without accepting attacker-supplied IDs.

Posts navigation

Older posts

Recent Posts

  • Pass Controller Data to a PHP MVC View
  • Recover from MySQL Server Has Gone Away Before a Transaction
  • Set the PHPMailer Envelope Sender Correctly
  • Speed Up SQL Server JDBC Batch Inserts with Bulk Copy
  • Reject NUL Bytes Before Saving PostgreSQL Text with PHP

Recent Comments

  1. Build Accessible Tabs with JavaScript – WebCheatSheet on How to Control Tab Order in HTML
  2. Verify SQL Server Backups with CHECKSUM and VERIFYONLY – WebCheatSheet on Fix SQL Server ‘Insufficient Access Rights’ During Backup
  3. Get the Latest MySQL Value Before Two Dates – WebCheatSheet on SQL GROUP BY
  4. Count Duplicate Values in a JavaScript Array – WebCheatSheet on JavaScript Arrays
  5. Fix MySQL Error 1038 for Wide Rows and Filesort – WebCheatSheet on Determine the MySQL Version from the Command Line

Archives

  • October 2026
  • September 2026
  • August 2026
  • October 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022

Categories

  • ASP
  • Email
  • HTML
  • JavaScript
  • MS Access Functions
  • PHP
  • SaaS Architecture
  • SQL
  • Uncategorized
Copyright © 2026 WebCheatSheetFresh News by Ascendoor | Powered by WordPress.