PHP-MySQL

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 …

Searching Images using PHP Read More »

Share

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” …

Upload images to web server using php Read More »

Share

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”; …

Display and Update records using PHP Read More »

Share

Insert Image at server and data in to mysql database

This example shows you that how to insert an image to server (localhost) and its path and file name to database along with other text information using php script and mysql database. Before we begin into programming, let’s create a folder called “uploaded” at “wamp/www/your-web-directory” and it should appear like “wamp/www/your-web-directory/uploaded”. After creating folder, now …

Insert Image at server and data in to mysql database Read More »

Share

PHP-Pagination Example

The below example shows that how to retrieve records from MySQL Database using PHP Pagination technique. In the below example  included image along with text information. For image and text storing and retrieving you can click here and refer the same. First of all create a php file called “pagination2.php” with following code in it. <html> <head> <title>Members …

PHP-Pagination Example Read More »

Share

Submit checkbox value to MySQL

Below example states that checkbox values can be stored into MySQL database using PHP program. Step 1: Create a table in MySQL with following screen shot. (Table name : Booked_Status) Step 2: Create connection string / configuration page as following example and name it ‘config2.php’ <?php $host=”localhost”; $username=”root”; $password=””; $dbname=”demo”; $con=mysql_connect(“$host”,”$username”,”$password”); mysql_select_db(“$dbname”,$con); ?> Step 3: …

Submit checkbox value to MySQL Read More »

Share

Password recovery example using php from MySQL

To retrieve the password from your MySQL Database with using PHP script. Step 1 : Create a table called “users” in your MySQL database with following structure for the same. Step 2: Create a configuration file called ‘config.php’ which contains connection string and local host / remote server path. <?php $connection = mysql_connect(‘localhost’, ‘root’, ”); …

Password recovery example using php from MySQL Read More »

Share

Responsibilities of a typical Web developer

Before we begin about responsibilities of web developer, let’s understand more about what are the skills and qualifications are required to become a web developer. In web developing, various skills are required to master the huge world of web. Hence one needs to learn various technologies as following.   For Designing: HTML, HTML5, CSS, CSS5, …

Responsibilities of a typical Web developer Read More »

Share

PHP-Database Programs

Following are the various PHP  programs to demonstrate Database  connections. 1. PHP Program to demonstrates whether the connection to mysql database is active or not. <?php $dbhost = ‘localhost’; $dbuser = ‘root’; $dbpass = ”; $db = ‘mars_db’; $conn = mysql_connect($dbhost,$dbuser,$dbpass); if (!$conn) { die(‘Could not connect: ‘ . mysql_error()); } else { echo ‘Connected …

PHP-Database Programs Read More »

Share
Share
Scroll to Top