If you just want to grab one record, or know that you are only expecting one result you can use the following code: <?php // […]
Loop Through Recordset With MySQL and PHP (MYSQLI Connection)
This is the basic syntax required to loop through a MySQL table and output the results <?php // Connect to your database $conn = mysqli_connect(“localhost”, […]
Loop Through MySQL Fields And Output A Form
This script will loop though all fields in a database and output the name and create a form field with appropriate record value. This is […]
Yamtrack To WordPress Sync
If you’re a fan of films and TV you’ll probably keep track of what you’re watching. While there are online services such as Trakt and […]
Simple PHP Mailer Function
Send an email with PHP – useful for a simple contact form if (isset($_POST[‘submit’])) // Your submit button or a required form field { $EmailTo […]
Split A Large MySQL Table Into Multiple SQL Files
If you have a large database table that is causing your import to fail, you can split the table out into smaller more manageable chunks […]
Set First Image In WordPress Post As The Featured Image
Add the following code to your functions.php file. To run it, simply visit any page on the site – DO NOT USE THIS CODE ON […]
Add Custom Content & Read More Link To WordPress RSS Feed
In your functions.php file add in the following code // Customize the content of the custom RSS feed function custom_rss_item($content) { global $post; // Build […]
Add Your Own Code Formatting In The Classic Editor With TinyMCE
If you want to add custom formatting to your content but don’t want to have to go into the HTML view and manually type it […]
Create A WordPress Child Theme
In order to create a Child theme we need to add a minimum of two files Create a new folder which will hold your child […]