Thursday 3 November 2016

Database Connection in PHP | How to create connection in php with database

Database Connection in PHP


Php support many types of database like SQL,MySQL,Oracle and other Microsoft database such as ODBC etc.

To create a connection to database with the help of PHP.You must have a server installed locally or remotely.If you buy web hosting on the internet you must know the database host name and password to connect to the database you created on that server.

Or if you don't have such type hosting you can make your computer as a server for this you have to install the server on your local computer.

To know how to make your Computer as server Please Follow the Link below:


Sunday 23 October 2016

Class in PHP | How create classes in PHP

Classes in PHP

Php Classes.Classes in Php is a new concept like C++.It covers the OOPs concept in PHP.OOPs stands for Object Oriented Programming.you can create classes in PHP like c++ with functions.

To do this:

<?php
class abc
{
function add1()
{
$a=10;
$b=20;
$c=$a+$b;
echo $c;
}
}
$obj=new abc;
$obj->add1();
?>

In the above PHP class example, we create a class with name "abc" also create function name "add1"
we declare two variable a and b and assign them value.Add them and assign the result to another variable c and show the result with echo command.

After this, we create an object of the class and call the function using that object. 

We can add multiple classes and functions in PHP.

<?php
class abc
{
function add1()
{
$a=10;
$b=20;
$c=$a+$b;
echo $c;
}
function mul()
{
$a=10;
$b=20;
$c=$a*$b;
echo $c;
}
}
$obj=new abc;
$obj->add1();
echo "</br>";
$obj->mul();

?>

PHP Class



Php Class
Php Class



Wednesday 5 October 2016

What is PHP ? Full form of PHP

PHP

What is PHP?

1.PHP stands for Hypertext Preprocessor.
2.PHP is a server-side script.
3.PHP is executed by the browsers.
4.PHP is free service.

PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages and websites.


PHP is a widely-used, free, and efficient language for website creation.


PHP file using .php extension for saving php files.

PHP Syntax:

Monday 26 September 2016

HTML iframes tag | How to use html iframe tags in web page

HTML Iframe tags.

HTML iframe tags are used to display a web page within a web page.so, we can say that Html Iframe tags are used to display a web page as a part of another web page.

Html Iframe tag defined with <iframe> </iframe> tags within the body <body> </body> tag of web page.

Html Iframe Syntax:

<iframe src="url"></iframe>

"src" attribute defines the address or path of the iframe webpage

Saturday 17 September 2016

Html Class | Class in Html | how to use class in html

Html Class: Html Class attribute is used to define styles for Html elements with the same class name.


how to use the class in HTML
you can use the Html class attribute to define the styles for elements for different elements with the same class name.
how to use the class in HTML

Html class Example:


1.Define Class style in head Section


<style>
.back{ background-color:red; }
</style>

Class attribute starts with .(dot) then use the Class name and define style for that Html class.

Tuesday 6 September 2016

HTML List Tags:Ordered and Unordered lists style using CSS

HTML List tags are two types Ordered Lists and Unordered lists style.


<ul> and <ol> HTML list tags for HTML lists.Use Horizontal List For Menu.

HTML list tags are used to insert or create lists in the web page and website.There are two styles in HTML ordered lists and unordered lists.You can use HTML list tags to create Menu for your website.


HTML List Tags
HTML-List styles:
Ordered ListUnordered List
  1. One
  2. Two
  3. Three
  4. Four
  5. Five
  • One
  • Two
  • Three
  • Four
  • Five
An ordered HTML List tag starts with <ol> tag and every list item starts with <li> tag.Every item in order list starts with Number,Upper Alphabet,Lower Alphabet,Upper Roman,Lower Roman or without any mark.

Ordered List Tag Example:
<ol>
  <li>First</li>
  <li>Second</li>
  <li>Third</li>
</ol>

An Unordered HTML List tag starts with <ul> tag and every list item starts with <li> tag.Every item in order list starts with Bullet,Circle,Square or without any mark.

Ordered List Tag Example:
<ul>
  <li>First</li>
  <li>Second</li>
  <li>Third</li>
</ul>
HTML List Tags

Nested HTML List Tag

Saturday 27 August 2016

HTML tables:How to create HTML Table in webpage and website

HTML TABLE


HTML Tables :We use HTML table <table></table> tag to define table in html webpage and website.The HTML table <table> tags also include sub table tags such as for define rows in HTML table we use <tr> tag, table  cell header is defined by <th> tag and <td> tag is used to define column or cell in HTML table.


All HTML table tags are given below:



<table>Table
<th>Table Cell header
<tr>Table Rows
<td>Table Cell or Column
<thead>Table Header
<tbody>Table Body
<tfoot>Table Footer
<caption>Table Caption

Note: <caption> tag must be put immediately after <table> start tag.



Create a simple table Example:


<table border="2px">
<tr>
   <th>Name</th><th>Class</th>
</tr>
<tr>
   <td>Hardeep</td><td>10th</td>
</tr>
<tr>
   <td>Suraj</td><td>12th</td>
</tr>
</table>

Html Table tag
Html Table tag

HTML Table Caption:


HTML table <caption> tag is used to add header or caption to a table.Adding a table caption is very useful  if there a lot's of tables in your web page or website.

Friday 19 August 2016

HTML links color tag and properties|How to change HTML Links Color

HTML Link Colors:Active,Visited,Unvisited links types.


If you want to apply different colors for Active link, Visited links, On mouse over.We can do this by using CSS properties. Also, you can disable underline from links by CSS property.It makes the links more attractive and realistic.

If you don't want to change these properties the browser provide these default properties:-

1.Active Links show in Red color and underlined.

2.Unvisited Links show in Blue color and underlined.

3.Visited Links show in Purple color and underlined.

To change Link properties follow the below property:-

Friday 12 August 2016

Background Image | Set Image as Background in HTML with CSS

"HTML Background Image" HTML Background images and colors.Use Image as background.


Insert in a web page or website using CSS/CSS3 help to make website/web page attractive.

1.Set or Add Background image or colors of your choice as Background in the HTML web page or website with the help of CSS/CSS3.

2.For this, you can use inline, Internal or External CSS as your comfortability.

3.We have these properties for Background setting:-
1.background-image
2.background-attachment
3.background-repeat
4.background-position

background-image property defines an image use as Background for your web page or website.

Example:

background-image: url("path");
background-attachment property is used to to make your

Wednesday 3 August 2016

Comment in Html page or web pages source code|How to insert comments in html

Comment Tag in Html page or website source code.

Comment tags are  used to insert comments in the HTML.Comments are not displayed on the web pages on the browser.But this can help the developer or programmer when the developer has to modify HTML source code.Comments are also helped while testing HTML page because you can comment out HTML lines of code, one at a time, to search for errors.

You can add Comments in your HTML source code by using the following syntax:

<!-- Write or Insert Your Comment Here -->

We use an exclamation mark in the opening tag but not in the close tag.

Example:

<!-- Paragraph tag start -->
<p>This is Paragraph </p>
<!-- Paragraph tag end Here -->

You can also use comment tag directly into other HTML tags without using additional comment tags.
Example:

<!--p>This is Paragraph </p-->

Html Source code:

<!DOCTYPE html>
<html>
    <head>
          <title>Paragraph Tag </title>
    </head>
<body>
<!-- Heading Start -->
<h1> Heading1</h1>
<!-- heading end -->
<!--h2> Heading2</h2-->
</body>
</html>

Output here:-



















Important Note: The text or things within the Comment tags will not be display on web pages.

Comment Below!

Thursday 28 July 2016

How to add heading in HTML-HTML5 or heading tags in HTML or websites?

Here are the steps to include heading in HTML pages or web pages of your website :-

HTML-HTML5 headings added using heading tags from h1-h6.h1,h2,h3,h4,h5,h6 are HTML headings

Headings are most important part of any document.We start any article, paragraph after giving their heading.you can also give heading before writing any article or description in HTML or web page by using Heading tags.Headings are defined with <h1> to <h6> tag in a HTML.


<h1> to <h6> have variation in size and importance.<h1> tag have bigger font size and most importance among all headings.while <h6> tag have smaller font size and most least importance among all headings.

Example:
<h1> Heading1</h1>
<h2> Heading2</h2>
<h3> Heading3</h3>
<h4> Heading4</h4>
<h5> Heading5</h5>
<h6> Heading6</h6>

Headings also important because search engine uses the headings to index the structure and data/content of your web pages/website pages.Also, user explores or view your pages through a heading of your document or page.So, it is necessary to provide a good heading.

Example:
HTML heading tags example:

<!DOCTYPE html>
<html>
    <head>
          <title>Paragraph Tag </title>
    </head>
<body>
<h1> Heading1</h1>
<h2> Heading2</h2>
<h3> Heading3</h3>
<h4> Heading4</h4>
<h5> Heading5</h5>
<h6> Heading6</h6>
</body>
</html>
output:-

https://androidbarclub.blogspot.com/


Please comment below !

Saturday 23 July 2016

How to apply CSS to any element for html page ?

Here i explain, what is CSS and how to use ?


What is CSS ?
CSS stands for Cascading Style Sheet. CSS is used to provide layout to html pages easy and efficiently.We can apply same CSS style to individual item or single page or multiple pages.
External CSS stylesheet can be apply to multiple pages.This is very helpful ,when you want same style for your website.

how to apply CSS?
we have syntax to apply CSS.
Syntax:element where have to apply{property:value;}

example: img { width: 200px; height: 200px;}

For apply CSS to any HTML element, we have to define CSS selector for particular HTML element.For these we have these selector.

1. Element selector 
This selector apply CSS to that HTML element that is define by Element.

Example: If we want to apply text color to paragraph using CSS.Follow these instructios:-
<style>
    p{color:red;}
</style>

2. Id selector 
This selector apply CSS to HTML element which is define with id attribute.

Example:If we want to apply text color to paragraph using CSS which is define by Id. Follow these instructios:-
<style>
    #par{color:red;}
</style>

3. Class selector 
This selector apply CSS to HTML element which is define with class attribute.

Example:If we want to apply text color to paragraph using CSS which is define by class. Follow these instructios:-
<style>
    .par{color:red;}
</style>

If you want to apply same CSS for different HTML elements,you can do this by following:-
Example:-
<style>
    h1,p{color:red;}
</style>

Thursday 21 July 2016

HTML Paragraph Tag | Paragraph tag HTML is used to add Paragraph in web page website

HTML Paragraph Tag used to add paragraph in web page or website with properties


1.Paragraph tag is an HTML tag which is used to insert a paragraph.

2.Paragraph tag is start with start tag <p> and end with end tag </p>.Something typed or written in this tag shows as a paragraph on a web page.


3.Here are some elements used with paragraph tag like align(Left,Right,Justify) to set the location or format of a paragraph.


4.You can also use "<pre></pre>" tag for paragraph.This tag provides proper space between the word that makes paragraph easy to read and look neat and clean.In this tag when you press "Enter" after typing the first line and type the second line.so second line show after the first line without using break tag <br>.


Paragraph tag Example:


<!DOCTYPE html>

<html>

    <head>

          <title>Image Tag </title>

    </head>

<body>

<p>This is a paragraph with paragraph tag. </p>

<p>This is a muliple line paragraph with paragraph tag. 

This is a muliple line paragraph with paragraph tag.

This is a multiple line paragraph with the paragraph tag.

</p>

<pre>This is a multiple line paragraph with the paragraph tag. 

This is a multiple line paragraph with the paragraph tag.

This is a muliple line paragraph with paragraph tag.

</pre>

</body>

</html>

Paragraph tag
Paragraph tag

Please comment if you like it.THANKS


Monday 18 July 2016

Html Link tag | How to insert link or anchor tag in html

Here are the Steps to insert a link in html or html5 page or website:-

1.HTML links are hyperlinks that help us to navigate different information or data on the internet using web pages. One click on the link help you to jump to another document or other web page.

2. A Html Link cannot only be apply on the text, you can apply it on images or any other element.

Html link tag 3.To insert link or hyperlink in html, we use <a> </a> tag.

 Example:
<a href="http://www.google.com/" >GOOGLE </a>

   In the above example,when you click on GOOGLE text it takes you to "http://www.google.com/" address on the internet.

4. You can also connect to other pages using html links as a local links.

    Example: <a href="main_index.php">Home</a>

     In the above example,when you click on Home text it takes you to "main_index.php" page.Html link tag

5.You can also use target attribute to define where the new link will be open on the browser window or tab.These attribute are _blank, _parent, _self(default), _top.

Example: 
<a ref="main_index.php"target="_blank">Home</a>

    when you click on Home ,Home page will be open in new tab/window.
Html link tag

6.You can also apply link on images or other elements.

    Example:
<a href="main_index.php"><img src="images/home.png" width="100px" height="100px"></a>

Full Description:
Html link tag <!DOCTYPE html>
<html>
    <head>
          <title>Image Tag </title>
    </head>
    <body>
<a href="https://www.google.com/">Text Link</a></br>
<a href="https://www.google.com/"><h1>Heading Link</h1></a></br>
<a href="image.html"><img src="images/click_buuton.png" alt="No Preview" width="200px" height="100px"></a>
    </body>
</html>

The output is:-


Html Link tag
Html Link tag

















Please comment to suggestions and improvements or email me for any questios.

Html link tag
How to add image in HTML , HTML5 or add image in your Website 
https://androidbarclub.blogspot.in/2016/07/how-to-add-image-in-html-html5-or-add.html

Wednesday 13 July 2016

How to add images in HTML or HTML5 using Image tag

Here are the Steps to insert or Display images in html,html5 or web page using <img> tag :


Html Image Tag
1.Image tag(<img>) is used to add images in html page or website.

2.Image tag have attributes like :src, alt, width, height, align.


3.Almost all latest browser support <img> tag.


4.Put Image tags <img> </img> tag in <body> tag in your web page.

Html Image Tag
Example:
<body>
<img src="image/light.jpg" alt="No Preview"/>
</body>

5."src" attribute provide the link or path of the image either local or internet link.while the alt attribute display text of alt attribute when image path is not correct or unavailable.It will look like the below image.Html Image Tag



Html image tag


Html Image Tag

6.Earlier version of HTML are also support other <img> tag attribute like: hspace, aligh, border.
But HTML5 does not support these attributes.


Example:

<!DOCTYPE html>

<html>
    <head>
          <title>Image Tag </title>
    </head>
    <body>
<img src="http://www.like.com/images/quote.jpg" alt="No Preview" width="300px" height="300px">
    </body>
</html>
Html Image Tag
  The output of above code is:
Html image tag

Tuesday 12 July 2016

Internal CSS | How to use Internal CSS in HTML Web page

Here is the Steps to apply Internal CSS in your web page for single HTML page:

1. Internal CSS is used to apply Style to single Html Page or Web page.
Internal CSS
2.For define Internal CSS in Html page you have to insert style( <style> </style>) tags within the head(<head>) tags.

For Example:
<head> <style></style> </head> 

  3.In between these style tags, you can define a style for different tags and items for your HTML page.
Internal CSS Example:
<style> h1{font-size:150%;} </style>

In the above example, we apply font-size to heading tag with help of Internal CSS. We can apply a different style to different items with help of Internal CSS on your Html web page.
4.If you are using div(<div>) tags in your Html page ,so in this situation, we can also use id,class to apply CSS.

Monday 11 July 2016

Use of Inline CSS in html | How to apply inline css

Inline CSS

Inline CSS is used to apply style to Html elements.Use Inline CSS within the html tag where you want to apply.

1.Create a html page with .html extension.

2.Put some html tags to apply inline CSS for individual item. For example :here we put a heading tag and a paragraph.

<h1>Hello Red</h1> <p>Hello Blue</p>

3.To apply inline CSS we use "Style" attribute within the heading and Paragraph tag different for heading and paragraph tag. like 

<h1 style="color:red;">Hello Red</h1>
<p style="color:blue;font-size:150%">Hello Blue</p>

Here the example of Inline CSS:

           <!DOCTYPE html>
      <html>
      <head>
          <title>Inline CSS </title>
      </head>
      <body>
Inline CSS
       <h1 style="color:red;">Hello Red</h1> 
       <p style="color:blue;font-size:150%;">Hello Blue</p>
      </body>
      </html>
The output is shown below:
Inline CSS
Inline CSS

Please comment for suggestions! Enjoy Learning web Development.
Inline CSS