| 0 comments ]

Append a String to a File Using PHP

To append a string to a file you will need to open the file using fopen() with the 'a' parameter. For example...

Determine a File Extension Using PHP

There are several ways determine a file extension using PHP. First is using the combination of strrpos() and substr...

PHP Number Formats

PHP's solution to formatting number is the number_format() function. This function take 4 arguments but only...

Reading a File Using PHP

A simple method for reading a file is to use the file() function which will return an array containing each line...

List a Directory's Contents Using PHP

To list the content of a directory you just need to use the combination of opendir() and readdir() functions. ...

Executing a Shell Command Using PHP

You can use either system() or exec() . Just remember to ALWAYS use the full path to the command. So instead of...

Finding Sub-Strings using PHP

PHP already have the function that check if a substring exists in another string. It's called strpos() . This...

Remove a File Extention Using PHP

To strip the file extension from a file name you can use the combination of strrpos() and substr() function like...

Remove a File Using PHP

To remove a file from php use the unlink() function. You can enter either the full path or the relative path to...

Read HTML files using PHP

Reading an html file is just like reading any other file. You could use fopen() combined with fread() or file_get_contents...

Reading a Remote File Using PHP

To read a remote file from php you have at least four options : 1. Use fopen() 2. Use file_get_contents() 3. CURL...

Image Gallery : Album List

Here is the page that the gallery visitors see. The code behind it is mostly the same as the one in the admin pages...

Image Gallery : Image List & Detail

Clicking on one of the album icon from the album list page will bring you to this page. The layout is similar to...

Image Gallery Administration Page

Login and logout Before you can access the admin pages you will need to login first. The login method is very basic...

Admin Page For Content Management System (CMS)

Now we start creating the administration page for our content management system. This page will list all the articles...

Creating A Guestbook Using PHP and MySQL ( Part 2 )

Welcome to the second part of this guestbook tutorial. In case you haven't read the first section then go here...

PHP and MySQL Resources on the Net

PHP MySQL Resources PHP Homepage Of course, I have to list this site here. This is where you can to download the...

User Authentication in PHP

Here are some authentication method that we'll discuss Basic authentication We hard code the username and password...

Uploading Files To the Server Using PHP

Now, we will make another upload script. But this time we won't save the file in the database. We will only...

Finding PHP and MySQL Hosting

There are a lot of things to consider when choosing a web hosting company. But one thing for sure is that price...

Paging Using PHP and MySQL (Part II)

When there's more than one column involved in paging there isn't much that we need to modify. We only need...

Update and Delete in MySQL

Delete Data The DELETE statement deletes rows from a table that satisfy the condition given by the WHERE clause...

Retrieve Data from MySQL Table

Retrieving the table data is easy, just use the SELECT statement like this mysql> SELECT * FROM species; +-...

Add Data to a MySQL Database

You can insert data to the tables directly from mysql> prompt or by loading a file containing the data. The...

Create a Table in MySQL

For this example we'll create two tables. The first one describe the species of animals available in a pet...

Create New MySQL Database

You need to use mysqladmin to create MySQL database. The command is simple just write mysqladmin in a dos window...

Add New MySQL User

For adding a new user to MySQL you just need to add a new entry to user table in database mysql . Below is an example...

Starting MySQL

Before starting the MySQL client make sure the server is turned on. If you run Windows 9x start the mysqld.exe...

PHP Editors

Because PHP files are just plain text files you can use any editor to create and edit PHP files. But even though...

PHP Forms

Using forms in a web based application is very common. Most forms are used to gather information like in a signup...

PHP Functions

Real world applications are usually much larger than the examples above. In has been proven that the best way to...

PHP Control Structures

The next examples will show you how to use control structures in PHP. I won't go through all just the ones...

Strings in PHP

Strings are probably what you will use most in your PHP script. From concatenating, looking for patterns, trim...

PHP Variable Types

PHP supports eight primitive types. Four scalar types: boolean : expresses truth value, TRUE or FALSE. Any non...

PHP Variables

Variables in PHP are represented by a dollar sign followed by the name of the variable. The variable name is case...

Using PHP Comments

Comment is a part of your PHP code that will not be translated by the PHP engine. You can use it to write documentation...

Opening & Closing PHP Tags

To open a block of PHP code in a page you can use one of these four sets of opening and closing tags Opening Tag...

Image Gallery : Modify & Delete Images

Here is the snapshot of the modify image form. It's very similar to the form to add the image except for the...

Image Gallery : Add Image

Adding a new image is easy. Just select in which album you want the image stored, supply the image name, description...

Image Gallery : Modify & Delete Albums

Here is the page where you can modify an album's name, description and image icon We display the album thumbnail...

Image Gallery : Add New Album

This is a very simple form where you can enter the album name, description and image. After you click the "Add...

User Authentication : Storing User ID's and Passwords In a MySQL Database

A more common method of authenticating a user is by checking the database to see if the submitted user id and password...

Basic User Authentication

With this basic authentication method we store the user information ( user id and password ) directly in the script...

User Authentication with Image Verification

In some cases you may want your loging form to be able to prevent automatic login by a robot ( script ). To achieve...

Content Management System ( CMS ) using PHP and MySQL

A Content Management System ( CMS ) is used to add, edit, and delete content on a website. For a small website...

Uploading Files To MySQL Database

Using PHP to upload files into MySQL database sometimes needed by some web application. For instance for storing...

Creating A Guestbook Using PHP and MySQL

You've seen it at least once right? Guestbook is one of the most common thing to find in a website. In this...

Form Validation Using PHP

Whenever you make a form you should not leave it alone without any form validation. Why? Because there is no guarantee...

Using PHP to Backup MySQL Databases

There are at least three ways to backup your MySQL Database : Execute a database backup query from PHP file. Run...

MySQL Update and Delete

There are no special ways in PHP to perform update and delete on MySQL database. You still use mysql_query() to...


Paging Using PHP

Ever use a Search Engine? I'm sure you have, lots of time. When Search Engines found thousands of results for...

Retrieve Data From a MySQL Database

Using PHP you can run a MySQL SELECT query to fetch the data out of the database. You have several options in fetching...

Insert Data into a MySQL Database

Inserting data to MySQL is done by using mysql_query() to execute INSERT query. Note that the query string should...

Create a MySQL Database With PHP

To create a database use the mysql_query() function to execute an SQL query like this
In MySQL Tutorials written by admin on 12-18-2008

Connect to MySQL Database

Opening a connection to MySQL database from PHP is easy. Just use the mysql_connect() function like this

Getting Started with MySQL

MySQL Tutorial - Getting Started By : PHP-MySQL-Admin Nov 11, 2005 This mysql tutorial covers the basic stuff that...

Getting Started with PHP

What is PHP? PHP is a web programming language used to write dynamic webpages. In this tutorial you will learn...

Installing PHP and MySQL

PHP and MySQL are usually associated with LAMP (Linux, Apache, MySQL, PHP). However, most PHP developer ( including...

Source:
http://www.php-mysql-tutorial.com/wikis

0 comments

Post a Comment