Management PHP-MySQL

Maintaining the Database

Maintaining the Database [MS Access] Database Security is essential Security can be administered in the form of: -A database Password -User-Level Security Compacting a Database -Backing up a Database -Importing and Linking external data Database Password —————————– -Simplest mode of securing a database. -Not very fool proof. -Database password to be used for opening database […]


Data Source Naming – DSN

In this post you’ll be able to create DSN [Data Source Naming] for establishing database connection. How to Create DSN for MS Access Here are the steps to create Data Source Naming or DSN for MS Access database. step1: Click on “Start” Menu and click on “Settings” step2: Go to “Control Panel” step3: click on […]


PHP Database connection

Database connections using PHP and MS Access 1. Display list of records from MS Access  database to PHP web page. (for this example you need to create a DSN from control panel, to create DSN click here) <html> <body> <h1> Connecting to Ms Access using PHP </h1> <hr> <?php $conn=odbc_connect(‘acc_php’,”,”); if (!$conn) { exit(“Connection Failed: ” […]


PHP-Login page and sessions

PHP Session Variables 1. Login page program using PHP and MySQL DB  a) first create a html page as following. <html> <body > <form method=”post” action=”userLogin.php” > <table border=”1″ > <tr> <td> <B>User-Id</B> </td> <td><input type=”text” name=”userid”> </tr> <tr> <td><B>Password</B></td> <td><input name=”password” type=”password”></input></td> </tr> <tr> <td><input type=”submit” value=”Submit”> <td><input type=”reset” value=”Reset”> </tr> </table> </form> </body> […]


PHP-Form validation

In this tutorials, you will be able to understand how form validation are done using php syntax. Step1 : Create a file called “Validation.php” and copy the following code and paste into it. <!DOCTYPE HTML> <html> <head> <style> .error {color: #FF00FF;} </style> </head> <body> <?php $nameErr = $emailErr = $genderErr = $websiteErr = “”; $name […]



Here are some basic programs using PHP 1. Arithmetic operation program using PHP <?php $str=” Arithmetic operation”; $a=4; $b=5; $c=$a+$b; echo “Sum=”, $c; $c=$a-$b; echo “<br>Sub=”, $c; $c=$a*$b; echo “<br>Mul=”, $c; $c=$a/$b; echo “<br>Div=”, $c; ?> 2. PHP program to print person name and age. <?php $name=”John”; $age=20; echo “Person name=”, $name; echo “<br>Age=”, $age; […]


install WAMP and RUN PHP program

How to run PHP programs using WAMP server on Windows operating system? First, Download WAMP server from Here are the steps to install WAMP server on your PC and run your first PHP program. 1.Double click on WAMP server set up file 2.Click on Run 3. Click “Next” 4. Click on “Accept” 5. Click […]



PHP = Pre-processor Hypertext PHP, a server side scripting languages widely (nearly 82% of the worlds websites are developed using PHP!) used in developing dynamic and interactive webpages. Advantages of PHP ——Dynamic content. —Computational capability. —Database and file system access. —Network access (from the server only). —Built-in libraries and functions. —Known platform for execution (as opposed […]


Searching Images using PHP

To search images using PHP from MySQL Database, follow the examples. First of all create a table in MySQL database with following fields. Now, insert some images by clicking on “insert” tab in MySQL. Now, create a HTML page as following tags. <html> <body> <h1> Image searching………</h1> <form name=f1 action=”image.php” method=”GET”> Enter image Id: <input […]


Upload images to web server using php

The following example shows that how to upload and download images / files [.jpeg/.png/.bmp/ .txt/.doc etc] to web server [localhost or remote server] 1. Create a HTML web page as following screen with code. <html> <head> <title>Image/File Uploading Form</title> </head> <body background=bg.jpg> <h2>File Upload:</h2> Select a file to upload: <form action=”file_uploader.php” method=”post” enctype=”multipart/form-data”> <input type=”file” name=”file” […]


Display and Update records using PHP

In this tutorials you’ll able to List / Display records and Update records using PHP program with MySQL as a back-end database. First of all we will display list of all records entered into MySQL database using PHP page. Here is the code for that. 1. File name : list_records.php <?php $host=”localhost”; $username=”root”; $password=””; $db_name=”mars_db”; […]