PHP / MySQL: Most Popular Articles
These articles are the most popular over the last month.
PHP Redirection
Sample code for creating a PHP redirection script to transfer users from one web page URL on your site to a new page URL or web site
Sample code for creating a PHP redirection script to transfer users from one web page URL on your site to a new page URL or web site
PHP Login Script
PHP code to create a login script - free code and tutorial to create a login script with PHP
PHP code to create a login script - free code and tutorial to create a login script with PHP
Uploading Files with PHP
Upload a file from your browser to your server using PHP
Upload a file from your browser to your server using PHP
Limit
Limit the results of your MySQL query to results between a certain number range.
Limit the results of your MySQL query to results between a certain number range.
Print_r () PHP Function
Print_R is used to return an array in a human readable form in PHP
Print_R is used to return an array in a human readable form in PHP
Using the MAIL function
Using the PHP MAIL function to send form data to an email from the web
Using the PHP MAIL function to send form data to an email from the web
Accessing File Data
How to open an external file with PHP and download its contents to use within your PHP file.
How to open an external file with PHP and download its contents to use within your PHP file.
PHP MySQL Tutorial
Run SQL commands from a PHP script, Connect to MySQL from PHP and retrieve data as shown in our PHP MySQL Tutorial
Run SQL commands from a PHP script, Connect to MySQL from PHP and retrieve data as shown in our PHP MySQL Tutorial
Learn PHP
Learn PHP from a simple web based tutorial. Explore basic PHP syntax, using variables, operators and operands, and the use of conditional statements.
Learn PHP from a simple web based tutorial. Explore basic PHP syntax, using variables, operators and operands, and the use of conditional statements.
Backup & Restore MySQL
Restore and upload your MySQL data using the backup you made and downloaded from a command prompt
Restore and upload your MySQL data using the backup you made and downloaded from a command prompt
PHP Functions
Learn PHP from a simple web based tutorial. How to use functions in PHP, use the date function, or write your own functions. Learn Date function formatting.
Learn PHP from a simple web based tutorial. How to use functions in PHP, use the date function, or write your own functions. Learn Date function formatting.
PHP from a .html File
This tutorial explains how to execute php code in a file with a .html extention
This tutorial explains how to execute php code in a file with a .html extention
Basic PHP Sessions
Once you have set a variable in a PHP session, this tutorial tells you how to retrieve it.
Once you have set a variable in a PHP session, this tutorial tells you how to retrieve it.
Pagination of Results
Use Pagination to display results of your MySQL query over multiple pages in PHP
Use Pagination to display results of your MySQL query over multiple pages in PHP
Using Cookies with PHP
Cookies are used to store information about a user on their computer. We can set cookies using PHP to track visitors, as shown in our tutorial.
Cookies are used to store information about a user on their computer. We can set cookies using PHP to track visitors, as shown in our tutorial.
Form Mail
How to send an email from a form on a website to your email using PHP
How to send an email from a form on a website to your email using PHP
Simple Site Search
This free tutorial teaches you how to search your site using php and mysql to give the site users instant search results. PHP and SQL.
This free tutorial teaches you how to search your site using php and mysql to give the site users instant search results. PHP and SQL.
Write to a file
Using PHP to create a file on your server and write data to it
Using PHP to create a file on your server and write data to it
Create a Database in MySQL
How to create a new database in MySQL using SQL or phpmyadmin.
How to create a new database in MySQL using SQL or phpmyadmin.
Simple PHP Calendar
Learn how to generate a simple PHP calendar using our PHP calendar tutorial - Learn PHP free
Learn how to generate a simple PHP calendar using our PHP calendar tutorial - Learn PHP free
Alter Table
How to use the MySQL alter table command, and what to combine it with to do different things to your database.
How to use the MySQL alter table command, and what to combine it with to do different things to your database.
Forms to MySQL
Store user submitted upload files or form data in a MySQL database using our SQL Form tutorial.
Store user submitted upload files or form data in a MySQL database using our SQL Form tutorial.
MySQL Data
Update data in MySQL by using Update SQL command code as demonstrated in our tutorial
Update data in MySQL by using Update SQL command code as demonstrated in our tutorial
Learn SQL (MySQL)
Just the basics you need to learn SQL code to use with your MySQL database. Free tutorial to learn MySQL.
Just the basics you need to learn SQL code to use with your MySQL database. Free tutorial to learn MySQL.
Processing Froms with PHP
Collect data from HTML forms to process with a PHP script as shown in our tutorial
Collect data from HTML forms to process with a PHP script as shown in our tutorial
PHP with HTML
How to embed php into HTML, or put HTML inside PHP so you can use both on the same page of your website.
How to embed php into HTML, or put HTML inside PHP so you can use both on the same page of your website.
Using Loops
Learn PHP from a simple web based tutorial. Learn to use the three types of loops - WHILE, FOR, and FOREACH loops in PHP programing.
Learn PHP from a simple web based tutorial. Learn to use the three types of loops - WHILE, FOR, and FOREACH loops in PHP programing.
Ordering MySQL Data
How to sort your MySQL data using a SQL Order By statement
How to sort your MySQL data using a SQL Order By statement
MySQL Login
Login to your mysql server from unix shell
Login to your mysql server from unix shell
HTTP_REFERER
How to find a page's referrer using HTTP_REFERER in PHP.
How to find a page's referrer using HTTP_REFERER in PHP.
Creating MySQL Tables
Create MySQL database by running SQL commands in the query window from phpMyAdmin
Create MySQL database by running SQL commands in the query window from phpMyAdmin
Str_replace
Str_replace is used to find and replace parts of a string in PHP
Str_replace is used to find and replace parts of a string in PHP
Extracting the File Extension
How to extract the extension (.jpg), (.gif), (.png), etc from the file name. This is useful if you are renaming the file.
How to extract the extension (.jpg), (.gif), (.png), etc from the file name. This is useful if you are renaming the file.
GD Library Basics
You can use the GD Library in PHP to dynamically create images
You can use the GD Library in PHP to dynamically create images
Using \$_SERVER in PHP
A free PHP tutorial explaining the difference between $_SERVER[PHP_SELF], $_SERVER[SCRIPT_NAME], and $_SERVER['REQUEST_URI']
A free PHP tutorial explaining the difference between $_SERVER[PHP_SELF], $_SERVER[SCRIPT_NAME], and $_SERVER['REQUEST_URI']
Text Editors
Text editors are useful tools for programers and web designers, we can tell you what a text editor is and how to use one.
Text editors are useful tools for programers and web designers, we can tell you what a text editor is and how to use one.
Instaling phpBB
How to install a phpBB web forum on your website - a tutorial for beginners
How to install a phpBB web forum on your website - a tutorial for beginners
PHP file includes
Include external files into a PHP file using the include or require commands
Include external files into a PHP file using the include or require commands
Renaming PHP Uploads
How to rename files uploaded by users before saving them to the server.
How to rename files uploaded by users before saving them to the server.
Template Your Site
Site templates for easy updating with include files headers and footers using PHP
Site templates for easy updating with include files headers and footers using PHP
fopen
Use fopen() to open up a file from php
Use fopen() to open up a file from php
Add Column
How to add a column to MySQL using the add column SQL command
How to add a column to MySQL using the add column SQL command
Show Tables
The show tables SQL command is used to display all the tables in a MySQL database
The show tables SQL command is used to display all the tables in a MySQL database
PHP & MySQL Poll
This tutorial explains how to make a basic poll using PHP and MySQL, along with the GD Library to give a pie chart of the poll results.
This tutorial explains how to make a basic poll using PHP and MySQL, along with the GD Library to give a pie chart of the poll results.
Rounding and Formatting
How to format a number in PHP - Free simple tutorial to using the number_format () function
How to format a number in PHP - Free simple tutorial to using the number_format () function
PHP Information
Use phpinfo to learn more about the version of PHP your server is running. PHPinfo command cans show you your PHP version, path, and specific settings.
Use phpinfo to learn more about the version of PHP your server is running. PHPinfo command cans show you your PHP version, path, and specific settings.
SQL Joins
Use a SQL Join to combine two or more tables data in MySQL
Use a SQL Join to combine two or more tables data in MySQL
What is Binary?
What are binary numbers, and how do you read them
What are binary numbers, and how do you read them
Generate a Unique ID
PHP code to generate a random unique user ID
PHP code to generate a random unique user ID
Learn MySQL
Learn MySQL from a simple web based tutorial. Learn and understand SQL code
Learn MySQL from a simple web based tutorial. Learn and understand SQL code
PHP Upload Security
Allowing users to upload files to your website poses security risks. Here are some ideas to help protect yourself.
Allowing users to upload files to your website poses security risks. Here are some ideas to help protect yourself.
Hello, World!
How to write a "Hello World" script, the most basic of all computer programs, in PHP.
How to write a "Hello World" script, the most basic of all computer programs, in PHP.
Introduction to Preg
Understanding the preg_match function and how to use it on your PHP website
Understanding the preg_match function and how to use it on your PHP website
MySQL Error Messages
How to report an error into PHP from MySQL when your SQL code has errors
How to report an error into PHP from MySQL when your SQL code has errors
Upload and SQL
Upload a file from your website to your server, and write it's details to a MySQL database - Using PHP and SQL.
Upload a file from your website to your server, and write it's details to a MySQL database - Using PHP and SQL.
PHP and Flat File
How to use PHP commands to interact with flat file text (txt) documents.
How to use PHP commands to interact with flat file text (txt) documents.
Count
The SQL Count command is used to count the number of records held on a specific table in a MySQL database
The SQL Count command is used to count the number of records held on a specific table in a MySQL database
What are PHP and MySQL
This site explains what PHP and MySQL are as well as how to use them and how they can work together to create dynamic content for websites.
This site explains what PHP and MySQL are as well as how to use them and how they can work together to create dynamic content for websites.
File ()
The PHP Function File () pulls data from an outside file and puts it into an array to be included in the program as demonstrated in our tutorial.
The PHP Function File () pulls data from an outside file and puts it into an array to be included in the program as demonstrated in our tutorial.
Drop Database
The drop database command in SQL will remove a database from the MySQL server
The drop database command in SQL will remove a database from the MySQL server
Drop Column
How to remove (drop) a column from a table using MySQL with your SQL database.
How to remove (drop) a column from a table using MySQL with your SQL database.
Drop Table
Delete an entire table from a MySQL database using the drop table command
Delete an entire table from a MySQL database using the drop table command
Using crypt () for Encryption
Using the crypt function in PHP to encrypt passwords and other data and keep them safe
Using the crypt function in PHP to encrypt passwords and other data and keep them safe
Add Unique
Add a unique table column in MySQL to ensure you do not have any duplicates, but using 'Add Unique' in your SQL Code
Add a unique table column in MySQL to ensure you do not have any duplicates, but using 'Add Unique' in your SQL Code
Countdown Timer with mktime
Create a simple countdown clock ticker in PHP using the mktime function
Create a simple countdown clock ticker in PHP using the mktime function
Rand ()
Generating a random number in PHP with the rand () function, or generating a random number between two given parameters
Generating a random number in PHP with the rand () function, or generating a random number between two given parameters
PHP in MySQL
Store your PHP code in a MySQL database and call it when needed
Store your PHP code in a MySQL database and call it when needed
Creating Thumbnails with PHP
Use PHP and the GD Library to create thumbnails of images on the fly in gif, jpg or png format.
Use PHP and the GD Library to create thumbnails of images on the fly in gif, jpg or png format.
Cal_days_in_month ()
This PHP function tells you how many days are in a given month in a given year.
This PHP function tells you how many days are in a given month in a given year.
Change
The change SQL command can be used to change a detail about a column in MySQL such as it's name.
The change SQL command can be used to change a detail about a column in MySQL such as it's name.
Comment Your PHP Code
How and why to comment your code in PHP
How and why to comment your code in PHP
What Is My IP?
This is a very short easy to understand tutorial about how do create a 'What is my IP' style script, to look up the users IP address as they visit the site
This is a very short easy to understand tutorial about how do create a 'What is my IP' style script, to look up the users IP address as they visit the site
Simple Rating System
A script that allows you to give a 1-5 star ratings for things on your site
A script that allows you to give a 1-5 star ratings for things on your site
Describe
The describe SQL command shows a tables fields and their formats
The describe SQL command shows a tables fields and their formats
Is_Numeric ()
The PHP function is_numeric is used to check if a variable is a number.
The PHP function is_numeric is used to check if a variable is a number.
MySQL Connect from PHP
When you have many pages requiring access to your MySQL database, it is a good idea to keep your connection login in a separate file, and call it from each of these PHP pages.
When you have many pages requiring access to your MySQL database, it is a good idea to keep your connection login in a separate file, and call it from each of these PHP pages.
Fgets ()
Fgets is a PHP function that gets data from an external file line by line.
Fgets is a PHP function that gets data from an external file line by line.
Address Book
Create an online address book using PHP
Create an online address book using PHP
Session_start()
The session_start() function is used at the beginning of all PHP pages utilizing sessions.
The session_start() function is used at the beginning of all PHP pages utilizing sessions.
Show Columns
The show columns command is used to display all the columns for a given table and their details.
The show columns command is used to display all the columns for a given table and their details.
Modify
Change the size of a MySQL column by using the Modify SQL command
Change the size of a MySQL column by using the Modify SQL command
Building Variables
How to build variables on the fly with PHP.
How to build variables on the fly with PHP.
Fread ()
Fread is a php function used to read the contents of a file and report the data back to the php file as demonstrated with our tutorial.
Fread is a php function used to read the contents of a file and report the data back to the php file as demonstrated with our tutorial.
Pow ()
How to use exponents in PHP to raise a number to the power of another number.
How to use exponents in PHP to raise a number to the power of another number.
Print ()
The print function in php is used to output (print) data.
The print function in php is used to output (print) data.
Backup phpBB
This tutorial shows you how to easily backup your phpbb forum, to restore your site if it should crash or be lost.
This tutorial shows you how to easily backup your phpbb forum, to restore your site if it should crash or be lost.
File_Get_Contents ()
File_get_contents reads the data from a file and returns it to the PHP file as a string as demonstrated in our tutorial.
File_get_contents reads the data from a file and returns it to the PHP file as a string as demonstrated in our tutorial.
PHP / MySQL - QuickTips
An index of QuickTips for the PHP / MySQL guide site.
An index of QuickTips for the PHP / MySQL guide site.
PHP Variable Reference
Everything you've ever wanted to know about PHP variables in an easy to understand, free tutorial.
Everything you've ever wanted to know about PHP variables in an easy to understand, free tutorial.
How to CHMOD from FTP
How the CHMOD a file to different permissions from your FTP program
How the CHMOD a file to different permissions from your FTP program
Rotate an Image
How to rotate an image using PHP with the GD Library
How to rotate an image using PHP with the GD Library
Calendars and Time
PHP functions and scripts related to the use and creation of calendars, or dates in PHP.
PHP functions and scripts related to the use and creation of calendars, or dates in PHP.
Session_destory ()
Session_destroy () is used to destroy all the data in a current session
Session_destroy () is used to destroy all the data in a current session
Connect to MySQL from PHP
How to connect to your MySQL database from a PHP document
How to connect to your MySQL database from a PHP document
Echo ()
Echo Function in PHP outputs (echos) the data to the page
Echo Function in PHP outputs (echos) the data to the page
Today's Date
An example of how to print the current date on a web page written in HTML using PHP
An example of how to print the current date on a web page written in HTML using PHP
Abs () PHP Function
How to use the ABS () function in PHP to return the absolute value of a number
How to use the ABS () function in PHP to return the absolute value of a number
fwrite ()
fwrite is a binary safe file write used to write to an external file from PHP
fwrite is a binary safe file write used to write to an external file from PHP
Array ()
Array () PHP Function assigns data into an array
Array () PHP Function assigns data into an array
PHP CSS Switcher
Allow your users to change CSS style on your site, using PHP and Cookies
Allow your users to change CSS style on your site, using PHP and Cookies
Session_unset ()
Session_unset() is used to clear all the variables in a session
Session_unset() is used to clear all the variables in a session
Htmlspecialchars () PHP Functi
Htmlspecialchars is used to convert special characters to HTML entities
Htmlspecialchars is used to convert special characters to HTML entities
Show Databases
Using the show databases SQL command to show all the databases on the MySQL server
Using the show databases SQL command to show all the databases on the MySQL server
Cookies and Sessions
What is the difference between sessions and cookies in PHP?
What is the difference between sessions and cookies in PHP?
Installing phpBB Mods
Once you have installed phpBB, you may want to add in additional features to customize your board. These are called mods or addons, and are easy to install.
Once you have installed phpBB, you may want to add in additional features to customize your board. These are called mods or addons, and are easy to install.
Eval ()
Eval () is used to evaluate its input string as PHP and then process it as such
Eval () is used to evaluate its input string as PHP and then process it as such
Use
Use the USE Command in MySQL to switch databases
Use the USE Command in MySQL to switch databases
Repair MySQL Table
How to repair a MySQL table using phpMyAdmin if you are getting errors or having trouble accessing it.
How to repair a MySQL table using phpMyAdmin if you are getting errors or having trouble accessing it.
Veiwing the Source
When you view source on your PHP files, why can't you see your code?
When you view source on your PHP files, why can't you see your code?
PHP Random Quote
This tutorial shows how to use switch () to display a random quote on your website - Free PHP Tutorial
This tutorial shows how to use switch () to display a random quote on your website - Free PHP Tutorial
Elseif ()
Elseif () is used in conditional statements to make choices.
Elseif () is used in conditional statements to make choices.
phpBB Templates
How to edit your phpBB template to have a custom look, or theme.
How to edit your phpBB template to have a custom look, or theme.
MySQL_Close ()
How to close a MySQL Connection from a PHP file
How to close a MySQL Connection from a PHP file
Your First PHP Script
A very basic walkthrough of everything you need to make your first PHP script, in simple straight forward terms.
A very basic walkthrough of everything you need to make your first PHP script, in simple straight forward terms.
Unset ()
Unset is used to destroy specified variables in PHP
Unset is used to destroy specified variables in PHP
Time Math
More information about dealing with Time in PHP
More information about dealing with Time in PHP
Feof () PHP Function
The FEOF PHP function is used to test for the end of the file.
The FEOF PHP function is used to test for the end of the file.
Mktime ()
Use the mktime function in PHP to get the timestamp for a specific date so you can create a countdown on your site.
Use the mktime function in PHP to get the timestamp for a specific date so you can create a countdown on your site.
Select
The SQL select statement is used to choose what data to pull from the mysql database
The SQL select statement is used to choose what data to pull from the mysql database
GD Library
Using the GD Library in PHP to create, resize, grayscale, rotate, draw, manipulate and edit images.
Using the GD Library in PHP to create, resize, grayscale, rotate, draw, manipulate and edit images.
Redirect Users to Hidden Pages
A simple password style redirect that sends a user to the word they enter plus .html as a way of hiding pages
A simple password style redirect that sends a user to the word they enter plus .html as a way of hiding pages
PHP AI Bots
Artificial intelligence is a responsive form of programing designed to simulate a human response. These sites give us more insight on how to do it with PHP.
Artificial intelligence is a responsive form of programing designed to simulate a human response. These sites give us more insight on how to do it with PHP.
URL Forwarding
Sometimes when you have a really long, unfriendly URL you want something shorter and easier to remember. We show you how to do this using a PHP redirect.
Sometimes when you have a really long, unfriendly URL you want something shorter and easier to remember. We show you how to do this using a PHP redirect.
PHP Math Functions
A list of commonly used math functions in PHP, and what they do.
A list of commonly used math functions in PHP, and what they do.
What is FTP
FTP Clients are used to FTP into your site and transfer data to and from your site
FTP Clients are used to FTP into your site and transfer data to and from your site
Session_set_cookie_params ()
Session_set_cookie_params () is used to set the duration of a session cookie, as well as other optional cookie information
Session_set_cookie_params () is used to set the duration of a session cookie, as well as other optional cookie information
Due Date Calculator
A PHP based online pregnancy due date calculator, step by step instructions on how to add a calculator to your page.
A PHP based online pregnancy due date calculator, step by step instructions on how to add a calculator to your page.
Integer
Integer is a mathematical term to define the set of whole numbers both positive and negative, as well as 0
Integer is a mathematical term to define the set of whole numbers both positive and negative, as well as 0
Create Database
Using the created database command in SQL to create a new database on the MySQL server
Using the created database command in SQL to create a new database on the MySQL server
Finding the Document Root
Often when installing scripts you need to know the document root. This simple script can give you that information.
Often when installing scripts you need to know the document root. This simple script can give you that information.
Stripslashes ()
Stripslashes is used to remove black slashes from data in php
Stripslashes is used to remove black slashes from data in php
Page Not Loading
Common solutions to PHP problems - PHP page not loading, showing a blank or white screen
Common solutions to PHP problems - PHP page not loading, showing a blank or white screen
Switch ()
The PHP switch () function is used in replace of multiple if or elseif statements.
The PHP switch () function is used in replace of multiple if or elseif statements.
Imagecreate ()
The imagecreate () function is used in PHP to create a new palette based image
The imagecreate () function is used in PHP to create a new palette based image
Where
In SQL [i]where[/i] is used with [i]select[/i] to choose specifically what to search for in your MySQL database
In SQL [i]where[/i] is used with [i]select[/i] to choose specifically what to search for in your MySQL database
PHP / MySQL - HowTos
An index of HowTos for the PHP / MySQL guide site.
An index of HowTos for the PHP / MySQL guide site.
Crypt () PHP Function
The crypt () function encrypts data in PHP. Data encryption through crypt is one way.
The crypt () function encrypts data in PHP. Data encryption through crypt is one way.
Hit Counter
Free web page hit counter code for your website, for a simple free web site hit counter written in PHP.
Free web page hit counter code for your website, for a simple free web site hit counter written in PHP.
Ceiling
Using CEIL or CEILING in SQL to round a number up when pulled from your MySQL database
Using CEIL or CEILING in SQL to round a number up when pulled from your MySQL database
Uniform Pages
Giving your page a uniform look isn't that hard, but updating it is. Changing a page design or a simple copyright notice can be time consuming when it must be done on all your pages.
Giving your page a uniform look isn't that hard, but updating it is. Changing a page design or a simple copyright notice can be time consuming when it must be done on all your pages.
Base_convert ()
Converting one number base to another using PHP
Converting one number base to another using PHP
Your Server's PHP
The phpinfo () is used to gather lot of information about what is running on your PHP server.
The phpinfo () is used to gather lot of information about what is running on your PHP server.
PHP Flat File Counter
This tutorial shows you step by step how to create a flat file counter (no database) using PHP
This tutorial shows you step by step how to create a flat file counter (no database) using PHP
Seperate Language Files
Why you should create a separate language file when creating a script you plan to release.
Why you should create a separate language file when creating a script you plan to release.
Boolean Logic
Boolean logic is a type of decision making utilized by computers to decide if a statement is true or false.
Boolean logic is a type of decision making utilized by computers to decide if a statement is true or false.
PHP Version
Do you need to check what version of PHP your server is running? This simple tutorial shows you how.
Do you need to check what version of PHP your server is running? This simple tutorial shows you how.
Basic Regular Expressions
The three most simple regular expressions that you will use with PHP
The three most simple regular expressions that you will use with PHP
Function
What is a PHP Function and how are they used
What is a PHP Function and how are they used
Guess The Number
This free tutorial teaches you how to write a simple guess the number game in PHP.
This free tutorial teaches you how to write a simple guess the number game in PHP.
Copyright Dates
This script automatically updates the copyright date on your website every year so that you don't have to worry about it.
This script automatically updates the copyright date on your website every year so that you don't have to worry about it.
