Fundamentals
Introduction
1st Android Application

OOPS Concepts
Class
Object
Abstraction
Encapsulation

Polymorphism
Inheritance
Message Passing
Dynamic Binding

UI Controls
TextView
Button
Toggle Button
CheckBox
Radio Button
Spinner
ProgressBar
SeekBar
RadioGroup
RatingBar
Switch
EditText
AutoComplete
TextView

MultiAutoComplete
TextView

ImageView
ImageButton
Gallery
MediaPlayer
VideoView
MediaController

TimePicker
DatePicker
CalendarView
Chronometer
Analog Clock
Digital Clock

Layouts
LinearLayout
RelativeLayout
GridLayout
TableLayout
FrameLayout
Fragment

Composite
ListView
ExpandableListView
GridView
ScrollView
SearchView
Sliding Drawer
Tab Widget
WebView

Transitions
Image Switcher
StackView
TextSwitcher
ViewAnimator
View Flipper
View Switcher

Advanced
Request Focus
View
View Stub
TextureView
Gesture Overlay View

SurfaceView
NumberPicker
Zoom Button
Zoom Controls
AbsoluteLayout

Database
SharedPreference
SQLite DB
MySQL DB

Webservices
Check HttpURLConnection
Single Webservice Call
Multi Webservice Call
ListView from Webservice
SQLite from Webservice
Data from Database

Telephone Manager
IMEI
IMSI
Phone Type
Sim Type
Network Type

Content Providers
Contact Provider
BookMark Provider
Own Provider


Message & Networking
Send SMS
SMS with Reports
Group SMS

Send E-Mail
Download Binary Data


Location Based Service
Display Google Map
Events with Google Map

Android Services
Create Service
Create Longtime Service

Asynchronous Task
Repeating Services
IntentService

Activity from a Service
Bind Activity to Service


Sample Projects
HMS
CNB
Login Screen
Camera Event
Browse Option
QR Code Events
Accelerometer Sensor
EditText from Spinner

Login Screen Creation in Android

  1. Sign Up
  2. Sign In

Note                     Download ADT Plugin Here.
Here I am using,
OS : Linux (Ubuntu 12.04)
Eclipse : Juno (Version 4.2.0)
Android API Level : 3 to 'n' as per need
Emulator API Level : It will be displayed in output image


Step 1 : Create a database named as Sample and import the below code

-- phpMyAdmin SQL Dump
-- version 3.4.10.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 17, 2013 at 10:20 AM
-- Server version: 5.5.28
-- PHP Version: 5.3.10-1ubuntu3.4

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
 

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
 
--
-- Database: `Sample`
--

-- --------------------------------------------------------

--
-- Table structure for table `student`
--

CREATE TABLE IF NOT EXISTS `student` (
  `uname` text NOT NULL,
  `pwd` varchar(20) NOT NULL,
  `id` varchar(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
--
-- Dumping data for table `student`
--

INSERT INTO `student` (`uname`, `pwd`, `id`) VALUES
('Balaji', 'balaji', '082IT111'),
('Sample', 'sample', '2'),
('BIT', 'bit', '3'),
('Selva', 'selva', '4');
 
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

Step 2 : Select File -> New -> Project -> Android Application Project (or) Android Project. Fill the forms and click "Finish" button. If you have any doubt regarding create a new project Click Here.

Step 3 : Open res -> layout -> activity_main.xml (or) main.xml and add following code :

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/rl"
    tools:context=".MainActivity" >
 
    <TextView
        android:id="@+id/textView1"
        android:textSize="22sp"
        android:textColor="#4169E1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="42dp"
        android:text="Login" />

 
    <EditText
        android:id="@+id/editText1"
        android:hint="User ID"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/textView1"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="42dp" />
 
    <EditText
        android:id="@+id/editText2"
        android:hint="Password"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/editText1"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="24dp"
        android:inputType="textPassword" />
    
</RelativeLayout>

Step 4 : Open res -> layout -> addme.xml and add following code :

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/rl"
    tools:context=".MainActivity" >
 
    <TextView
        android:id="@+id/textView1"
        android:textSize="22sp"
        android:text="Add Me"
        android:textColor="#4169E1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="42dp" />
 
    <EditText
        android:id="@+id/editText1"
        android:hint="Enter ID"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/textView1"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="40dp" />
 
    <EditText
        android:id="@+id/editText2"
        android:hint="Enter Username"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/editText1"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="30dp" />
 
    <EditText
        android:id="@+id/editText3"
        android:hint="Enter Password"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/editText2"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="30dp"
        android:inputType="textPassword" />
 
    <EditText
        android:id="@+id/editText4"
        android:hint="Confirm Password"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/editText3"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="22dp"
        android:inputType="textPassword" />
    
</RelativeLayout>

Step 5 : Open res -> layout -> nextpage.xml and add following code :

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity" >
 
    <TextView
        android:id="@+id/textView1"
        android:textSize="22sp"
        android:textColor="#FF0000"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="42dp" />
    
</RelativeLayout>

Step 6 : Open src -> package -> MainActivity.java and add following code :

package balaji.loginscreen;
 
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONObject;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.Toast;
 
public class MainActivity extends Activity {
	
	RelativeLayout rl;
	EditText id, pass;
	
	InputStream is=null;
	String result=null;
	String line=null;
	
	private SharedPreferences prefs;
	private String prefName = "report";
 
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		rl = (RelativeLayout) findViewById(R.id.rl);
		id = (EditText) findViewById(R.id.editText1);
		pass = (EditText) findViewById(R.id.editText2);
		
		rl.setOnLongClickListener(new View.OnLongClickListener() {
			
			@Override
			public boolean onLongClick(View arg0) {
				// TODO Auto-generated method stub
				
				if(id.getText().toString().equals(""))
					Toast.makeText(getBaseContext(), "Enter Username", 
							Toast.LENGTH_SHORT).show();
				
				else if(pass.getText().toString().equals(""))
					Toast.makeText(getBaseContext(), "Enter Password", 
							Toast.LENGTH_SHORT).show();
				
				else
					login();
				
				return true;
			}			
		});
	}
 
	private void login() {
		// TODO Auto-generated method stub
		
		ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
		 
		nameValuePairs.add(new BasicNameValuePair("id",id.getText().toString()));
	    	
		try
		{
			HttpClient httpclient = new DefaultHttpClient();
			HttpPost httppost = new HttpPost("http://10.0.2.2/login.php");
			httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
			HttpResponse response = httpclient.execute(httppost); 
			HttpEntity entity = response.getEntity();
			is = entity.getContent();		      
		}
		catch(Exception e)
		{
			Log.e("Fail 1", e.toString());
			Toast.makeText(getApplicationContext(), "Invalid IP Address",
					Toast.LENGTH_LONG).show();
		}     
	        
		try
		{
			BufferedReader reader = new BufferedReader
					(new InputStreamReader(is,"iso-8859-1"),8);
			StringBuilder sb = new StringBuilder();
			while ((line = reader.readLine()) != null)
			{
				sb.append(line + "\n");
			}
			is.close();
			result = sb.toString();
	 
		}
		catch(Exception e)
		{
			Log.e("Fail 2", e.toString());
		}     
	       
		try
		{
			JSONObject jobject = new JSONObject(result);
			
			String S_pwd = jobject.getString("pass");
			String S_name = jobject.getString("name");
			String S_id = jobject.getString("id");
			
			if(S_pwd.equals(pass.getText().toString())) {
				
				Toast.makeText(getBaseContext(), "Login Successfully", 
						Toast.LENGTH_SHORT).show();
				
				prefs = getSharedPreferences(prefName, MODE_PRIVATE);
				SharedPreferences.Editor editor = prefs.edit();
		
				//---save the values in the EditText view to preferences---
	        		editor.putString("id", S_id);
				editor.putString("name", S_name);
		
				//---saves the values---
	        		editor.commit();
				
				Intent i = new Intent(MainActivity.this, NextPage.class);
				startActivity(i);
			}
			
			else {
				Toast.makeText(getBaseContext(), "Login Failure \n" +
						"\n Try Again", Toast.LENGTH_LONG).show();
				
				id.setText("");
				pass.setText("");
			}
		}
		catch(Exception e)
		{
			Log.e("Fail 3", e.toString());
		}
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}
	
	@Override
    public boolean onOptionsItemSelected(MenuItem item) {
	// TODO Auto-generated method stub
		
		switch(item.getItemId()) {
		
			case R.id.addme :
				finish();
				Intent j = new Intent(MainActivity.this, AddMe.class);
				startActivity(j);
				return true;
		}
		
		return false;
	}
 
	@Override
	public void onBackPressed() {
		// TODO Auto-generated method stub
		
		finish();
	}
}

Step 7 : Open src -> package -> AddMe.java and add following code :

package balaji.loginscreen;
 
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONArray;
import org.json.JSONObject;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.Toast;
 
public class AddMe extends Activity {
	
	RelativeLayout rl;
	EditText id, uname, pwd, repwd;
	
	InputStream is=null;
	String result=null;
	String line=null;
	int code, count;
	
	List<String> ListID;
	
	private SharedPreferences prefs;
	private String prefName = "report";
 
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.addme);
		
		GetID();
		
		rl = (RelativeLayout) findViewById(R.id.rl);
		id = (EditText) findViewById(R.id.editText1);
		uname = (EditText) findViewById(R.id.editText2);
		pwd = (EditText) findViewById(R.id.editText3);
		repwd = (EditText) findViewById(R.id.editText4);
		
		rl.setOnLongClickListener(new View.OnLongClickListener() {
			
			@Override
			public boolean onLongClick(View v) {
				// TODO Auto-generated method stub
				
				if(uname.getText().toString().equals(""))
					Toast.makeText(getBaseContext(), "Enter Username", 
							Toast.LENGTH_SHORT).show();
				
				else if(pwd.getText().toString().equals(""))
					Toast.makeText(getBaseContext(), "Enter Password", 
							Toast.LENGTH_SHORT).show();
				
				else if(repwd.getText().toString().equals(""))
					Toast.makeText(getBaseContext(), "Enter Confirm Password", 
							Toast.LENGTH_SHORT).show();
				
				else {
					
					count = 0;
					
					for(int i=0; i<ListID.size(); i++) {
						
						if(ListID.get(i).toString().equals(id.getText().toString())) {
							
							count ++;
						}
					}
					
					if(count != 0) {
						
						Toast.makeText(getBaseContext(), "This ID is already " +
								"taken by Someone", Toast.LENGTH_LONG).show();
						id.setText("");
					}
					else {
						
						if(pwd.getText().toString().equals(repwd.getText().toString())) {
							
							AddUser();
						}
						else {
							
							Toast.makeText(getBaseContext(), "Re-Enter the " +
									"Password Correctly", Toast.LENGTH_LONG).show();
							
							pwd.setText("");
							repwd.setText("");
						}
					}
				}
				
				return true;
			}
		});
	}
	
	private void GetID() {
		
		try
	   	{
	   		HttpClient httpclient = new DefaultHttpClient();
	   		HttpPost httppost = new HttpPost("http://10.0.2.2/GetID.php");
	   		HttpResponse response = httpclient.execute(httppost); 
	   		HttpEntity entity = response.getEntity();
	   		is = entity.getContent();		      
	   	}
	   	catch(Exception e)
	   	{
	   		Log.e("Fail 1", e.toString());
	   		Toast.makeText(getApplicationContext(), "Invalid IP Address",
	   				Toast.LENGTH_LONG).show();
	   	}     
	        
	   	try
	   	{
	   		BufferedReader reader = new BufferedReader
	   				(new InputStreamReader(is,"iso-8859-1"),8);
	   		StringBuilder sb = new StringBuilder();
	   		while ((line = reader.readLine()) != null)
	   		{
	   			sb.append(line + "\n");
	   		}
	   		is.close();
	   		result = sb.toString();	 
	   	}
	   	catch(Exception e)
	   	{
	   		Log.e("Fail 2", e.toString());
	   	}     
	       
	   	try
	   	{
	   		JSONArray jarray = new JSONArray(result);
	   		JSONObject jobject = null;
	   		
	   		ListID = new ArrayList<String>();
	   		
	   		for(int i=0; i<jarray.length(); i++) {
	   			
	   			jobject = jarray.getJSONObject(i);
	   			ListID.add(jobject.getString("id"));
	   		}
	   	}
	   	catch(Exception e)
	   	{
	   		Log.e("Fail 3", e.toString());
	   	}
	}
	
	private void AddUser() {
		
		ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
		 
	   	nameValuePairs.add(new BasicNameValuePair("id", id.getText().toString()));
	   	nameValuePairs.add(new BasicNameValuePair("name", uname.getText().toString()));
	   	nameValuePairs.add(new BasicNameValuePair("pass", pwd.getText().toString()));
	    	
	   	try
	   	{
	   		HttpClient httpclient = new DefaultHttpClient();
	   		HttpPost httppost = new HttpPost("http://10.0.2.2/add.php");
	   		httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
	   		HttpResponse response = httpclient.execute(httppost); 
	   		HttpEntity entity = response.getEntity();
	   		is = entity.getContent();		      
	   	}
	   	catch(Exception e)
	   	{
	   		Log.e("Fail 1", e.toString());
	   		Toast.makeText(getApplicationContext(), "Invalid IP Address",
	   				Toast.LENGTH_LONG).show();
	   	}     
	        
	   	try
	   	{
	   		BufferedReader reader = new BufferedReader
	   				(new InputStreamReader(is,"iso-8859-1"),8);
	   		StringBuilder sb = new StringBuilder();
	   		while ((line = reader.readLine()) != null)
	   		{
	   			sb.append(line + "\n");
	   		}
	   		is.close();
	   		result = sb.toString();	 
	   	}
	   	catch(Exception e)
	   	{
	   		Log.e("Fail 2", e.toString());
	   	}     
	       
	   	try
	   	{
	   		JSONObject jobject = new JSONObject(result);
	   		code=(jobject.getInt("code"));
				
	   		if(code==1)
	   		{
	   			Toast.makeText(getBaseContext(), "Added Successfully",
	   					Toast.LENGTH_SHORT).show();
	   			
	   			prefs = getSharedPreferences(prefName, MODE_PRIVATE);
				SharedPreferences.Editor editor = prefs.edit();
		
				//---save the values in the EditText view to preferences---
	        		editor.putString("id", id.getText().toString());
				editor.putString("name", uname.getText().toString());
		
				//---saves the values---
	        		editor.commit();
				
				Intent i = new Intent(AddMe.this, NextPage.class);
				startActivity(i);
	   		}
	   		else
	   		{
	   			Toast.makeText(getBaseContext(), "Sorry, Try Again",
	   					Toast.LENGTH_LONG).show();
	   		}
	   	}
	   	catch(Exception e)
	   	{
	   		Log.e("Fail 3", e.toString());
	   	}
	}
	
	@Override
	public void onBackPressed() {
		// TODO Auto-generated method stub
		
		finish();
		startActivity(new Intent(AddMe.this, MainActivity.class));
	}
}

Step 8 : Open src -> package -> NextPage.java and add following code :

package balaji.loginscreen;
 
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.text.Html;
import android.widget.TextView;
 
public class NextPage extends Activity {
 
	TextView text;
	String welcome, name, id;
	
	private SharedPreferences prefs;
	private String prefName = "report";
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.nextpage);
		
		prefs = getSharedPreferences(prefName, MODE_PRIVATE);
		name = prefs.getString("name", "Balaji");
		id = prefs.getString("id", "082IT111");
		
		welcome = "Welcome <font color = '#4169E1'> " + name + "</font>";
		
		text = (TextView) findViewById(R.id.textView1);
		text.setText(Html.fromHtml(welcome));
	}
	
	@Override
	public void onBackPressed() {
		// TODO Auto-generated method stub
		
		finish();
		startActivity(new Intent(NextPage.this, MainActivity.class));
	}	
}

Step 9 : Open AndroidManifest.xml and add following code :

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="balaji.loginscreen"
    android:versionCode="1"
    android:versionName="1.0" >
 
    <uses-sdk
        android:minSdkVersion="3"
        android:targetSdkVersion="17" />
    
    <uses-permission android:name="android.permission.INTERNET"/>
 
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="balaji.loginscreen.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
 
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        
        <activity android:name=".NextPage"></activity>
        
        <activity android:name=".AddMe"></activity>
        
    </application>
 
</manifest>

Step 10 : Open res ->values ->strings.xml and add following code :

<?xml version="1.0" encoding="utf-8"?>
<resources>
 
    <string name="app_name">LoginScreen</string>
 
</resources>

Step 11 : Open res ->menu ->activity_main.xml and add following code :

<menu xmlns:android="http://schemas.android.com/apk/res/android" >
    
    <item 
        android:id="@+id/addme"
        android:showAsAction="never"
        android:title="Add Me" />
 
</menu>

Step 12 : Create GetID.php and add following code :

<?php
 
$host = '127.0.0.1';
$uname = 'root';
$pwd = 'password';
$db = "Sample";
 
$con = mysql_connect($host,$uname,$pwd) or die("connection failed");
mysql_select_db($db,$con) or die("db selection failed");
 
$r = mysql_query("select * from student",$con);
 
while($row = mysql_fetch_array($r))
{
	$flag[] = $row;
}
 
print(json_encode($flag));
mysql_close($con);
 
?>

Step 13 : Create add.php and add following code :

<?php
 
$host = '127.0.0.1';
$uname = 'root';
$pwd = 'password';
$db = "Sample";
 
$con = mysql_connect($host,$uname,$pwd) or die("connection failed");
mysql_select_db($db,$con) or die("db selection failed");
 
$id = $_REQUEST['id'];
$name = $_REQUEST['name'];
$pass = $_REQUEST['pass'];
 
$flag['code'] = 0;
 
if($r = mysql_query("insert into student values('$name', '$pass', '$id') ",$con))
{
	$flag['code']=1;
}
 
print(json_encode($flag));
mysql_close($con);
 
?>

Step 14 : Create login.php and add following code :

<?php
 
$host = '127.0.0.1';
$uname = 'root';
$pwd = 'password';
$db = "Sample";
 
$con = mysql_connect($host,$uname,$pwd) or die("connection failed");
mysql_select_db($db,$con) or die("db selection failed");
 
$id = $_REQUEST['id'];
 
$flag[pass] = 'Unknown';
$flag[name] = 'Unknown';
$flag[id] = 'Unknown';
 
$r = mysql_query("select * from student where id = '$id'",$con);
 
while($row = mysql_fetch_array($r))
{
	$flag[pass] = $row[pwd];
	$flag[name] = $row[uname];
	$flag[id] = $row[id];
}
 
print(json_encode($flag));
mysql_close($con);
 
?>

Step 15 : Our output will be like this :


Output


Output


Output


Output


Output


Output









SHARE THIS PAGE



product 2

product 3

product 4

Feedbacks : balaji.scz@gmail.com