PHP Posts

php log image of an elephant

Basic php stuff Check out a collection of php articles on basic stuff that we must know when we deal with php.

Send Email in PHP using PHPMailer and Gmail Want to send emails with PHP effortlessly? You're in the right place! In this post, we'll show you how to use PHPMailer and Gmail's SMTP server to make sending emails an easy job. Posted: 30-Oct-2023 | PHP Tutorials | Views 138

Creating dynamic web pages using PHP and MySQL In this tutorial we are going to create a simple shop so you can see how we can output dynamic content from the database, and display it accordingly to the query that we make. Posted: 04-May-2023 | Full Stack Tutorials | Views 629

How to properly validate an uploaded image file using php In this post i m going to show you how to be sure, that the uploaded file is an image. We are going to properly validate an uploaded image using php. The code that we are going to write can easily used in a live project Posted: 21-Mar-2023 | PHP Tutorials | Views 1421

Coding a registration system with email verification using php and mysql In this article we are going to create a complete secure registration system. That means that we are gonna have a register page, an email verification page, where we are going to send a 6 digits code to the user to verify his email, a login page, a forgot password page, where the user will fill his email and we are going to send him a new password. And an account page where we redirect the user when he successfully log's in. Posted: 16-Mar-2023 | PHP and MYSQL | Views 1602

How to create a simple php and mysql pagination Hi everyone, let's create a simple pagination using php and mysql. In this tutorial we are going to query a mysql database table with php. And we are going to create a pagination action to split the content in many pages. Posted: 05-Feb-2023 | PHP and MYSQL | Views 2043

How to storing likes and dislikes in a json file We are going to create a like and dislike system with PHP and JavaScript. But instead of storing the likes or dislikes in the database we are going to store them in a json file. Posted: 05-Jan-2023 | PHP and AJAX | Views 423

How to generate a random secure password using php Hello everyone, in this tutorial we are going to see how to generate a good and strong random password using php. We are going to write two functions. The first function will return a fixed length password, and the second will return the length that we specify. Posted: 09-Nov-2022 | PHP Tutorials | Views 2539

PHP explode function explained in plain English Hi everyone, in this tutorial i am going to explain as simple as i can how the explode() php function works. We are gonna see real world examples on how we make use of the explode() function. Posted: 29-Oct-2022 | PHP Lang Reference | Views 155

How to create update read and delete data in a json file with php Hello everyone, in this tutorial we are going to see how to create a CRUD back-end application using php. CRUD stands for create, read, update, and delete. So we are going to insert, update, read, and delete users in a JSON file. Posted: 20-Oct-2022 | PHP and JSON | Views 1432

Coding a secure login system with php and mysql Hi guys. In this tutorial we are going to create a secure login system with php and mysql. We are gonna have a register page, a login page, a forgot password page, and an user account page where the user is going to be redirected when he logs in successfully. Every input field will have a proper and secure validation, so you can easy implement the code in a live website. Posted: 26-Sep-2022 | PHP and MYSQL | Views 6110

How to send multiple checkbox values to php In this post i will explain as plain and simple i can, on how to send the values of multiple checked checkboxes to the server and fetch them with php. I have put together an example, a live demo, which you can check out. Posted: 15-Sep-2022 | PHP Tutorials | Views 1850

How to create write read and delete files in php As a php programmer you will use very often the php built-in filesystem functions to create, read, write, and delete files. So in this tutorial we are going to see, and explain in plain English how we do this. Posted: 25-Aug-2022 | PHP Lang Reference | Views 432

Get selected image type from folder with php Hey everyone, In this tutorial we are going write a small application to grab and display images from a folder based on their extensions. Check out the live demo to get an idea on what we are going to code. Posted: 23-Aug-2022 | PHP Tutorials | Views 875

How to display form errors with php In this tutorial we are going to see how to display form errors under every input field with php. We are going to have a simple validation, checking for empty fields. If a field is empty we are going to display an error message under it. If both fields have values then we are going to show a success message. Posted: 20-Aug-2022 | PHP Tutorials | Views 3961

How to get random items from an array in php In this tutorial we are going to see how to pick random items from an array. Let's say you have an array full of usernames and you want to pick a random user as a winner for your give away. Let's see how we do this. Posted: 31-Jul-2022 | PHP Tutorials | Views 211

Using php Ajax and a dropdown select menu to filter database data In this tutorial we are going to use a select menu, to filter items displayed in the screen. In web development terms this is a full stack tutorial. That means that we are gonna use html, css, javascript, Ajax, php, and mysql to create this little app. Posted: 15-Jul-2022 | PHP and AJAX | Views 5009

Edit json files with php Most of the time when we build a website, we are gonna have a folder with a bunch of json files inside. Those json files are containing information that usually is spread throughout the whole website. So in this tutorial we are going to build a php application with which we are going to fetch the data from the json files and edit them. Posted: 07-Jul-2022 | PHP and JSON | Views 1564

Zip files with php by coding a real world application Zip is a popular compress format that we use very often to move files through the internet. We use zip files as attachments in our emails, we get a zip archive when we download files from a website, or we zip files so they take less space in our computer. Posted: 13-May-2022 | PHP Tutorials | Views 396

Register and login application with php and json In this tutorial we are going to put together a register and login application. But instead of registering the user in a database, we are going to put his username and password in a JSON file Posted: 04-May-2022 | PHP-OOP | Views 5906

How to calculate the days between two dates in php With php we can calculate the days between two dates, and check if a 30 days account has expired or not. We are going to work with the DateTime object to do the work. Posted: 14-Apr-2022 | PHP Tutorials | Views 495

How to create an upload progress bar with javascript In this full stack tutorial we are going to see how to track the progress when we upload a file to the server. We are going to use AJAX, and PHP to get the task done. Posted: 30-Mar-2022 | PHP and AJAX | Views 1836

How to display JSON data in a dynamic HTML table with PHP In this article, we are going to fetch the data from a JSON file, and we are going to put them inside a dynamic HTML table with PHP. And as most of the time you can download the free source code. Posted: 27-Mar-2022 | PHP and JSON | Views 5308

How to create a JSON file from a MySQL database using php In this article we are gonna fetch data from a MySQL database table and we are going to store them in a JSON file using php. Posted: 22-Mar-2022 | PHP and JSON | Views 849

Sending dynamic HTML email using php In this article we are gonna see how to send html and css structured emails. We are gonna see how to read an entire web page and send the page using the mail function. Posted: 08-Mar-2022 | PHP Tutorials | Views 3117

How to store, update and remove data in a php session Hello everyone in this article we are gonna see how to create a products session, like the ones we use in a shopping cart. Posted: 27-Feb-2022 | PHP Tutorials | Views 961

How to fetch database data as arrays or objects in php In this article we are gonna see how we can turn the data fetched from the database, into a php array or an object. In the following paragraphs we are going to use the fetch methods that the mysqli_result object provides us, to create arrays and objects from the database data. Posted: 15-Feb-2022 | PHP Lang Reference | Views 2368

How to insert JSON data in the database In this article we are going to grab data from a JSON file and insert them in the database. The data stored in the JSON file are some products for a bike store. Posted: 06-Feb-2022 | PHP and MYSQL | Views 1492

Writing mysql prepared statements Prepared statements are going to make our transactions with the database safer and more secure. Every time a user's input interacts with the database we have to use prepared statements to avoid any risk of an SQL injection. Posted: 04-Feb-2022 | PHP and MYSQL | Views 1303

How to upload multiple files with PHP In this post we are going to see, how easy it is to select and upload multiple files to the server with php Posted: 18-Jan-2022 | PHP Tutorials | Views 1106

Storing form data in a json file with php We are going to see how to store messages from a contact form in a JSON file using php. Posted: 15-Jan-2022 | PHP and JSON | Views 3191

How to encode and decode JSON data using php In this post we are going to deal with JSON and PHP. We are going to see how to encode and decode JSON values using the php json_encode and json_decode functions. Posted: 14-Jan-2022 | PHP and JSON | Views 895

How to write an image upload and validation class In this tutorial we are going to use the object oriented programming - OOP style, and write an imageUpload class to upload an image using php. Posted: 12-Jan-2022 | PHP-OOP | Views 794

Tutorial Categories