Google+ PHP TUTORIALS ONLINE HELP FOR MEDICAL AND PROGRAMMING

Sunday, 15 February 2015

Responsive Navigation HTML5 AND CSS3

Responsive Navigation HTML5 AND CSS3

Responsive Navigation HTML5 AND CSS3

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Navigation HTML5 AND CSS3</title>
<style type="text/css">
*{
margin:0;
padding:0;

}
#brand{
font-family:Verdana, Geneva, sans-serif;
font-size:30px;
line-height:50px;
float:left;

}
nav{
background:#666;
width:100%;
text-align:center;


}
nav ul{float:right;line-height:50px;}
nav li{
list-style-type::none;
display:inline;
}
nav a{
text-decoration:none;
color:#CCC;
padding:10px;
font-family:Verdana, Geneva, sans-serif;
}
nav a:hover{color:#333;}
@media screen and (max-width:768px){

#brand{margin-top:-50px;}
nav{}
nav ul{float:none; margin-top:50px;background:#F03;}
nav li{display:inline;}
nav a{color:#ccc;}
nav a:hover{color:#ffffff;}


}

@media screen and (max-width:480px){

#brand{width:100%; text-align:center;}
nav{}
nav ul{float:none; margin-top:50px;background:#F03;}
nav li{display:inline;}
nav a{color:#ccc; display:block; border-bottom:1px dotted #ccc; margin:0; padding:3px;}
nav a:hover{color:#ffffff;}


}
</style>
</head>
<body>
<div id="brand">Responsive Navigation</div>
<nav>
<ul>
<a href="#"><li>HOME</li></a>
<a href="#"><li>ABOUT US</li></a>
<a href="#"><li>BLOG</li></a>
<a href="#"><li>PORTFOLIO</li></a>
<a href="#"><li>CONTACT US</li></a>
<a href="#"><li>CONTACT US</li></a>
</ul>
</nav>

</body>
</html>

Friday, 13 February 2015

How to Create Mobile Screen Using for HTML,HTML5,CSS,CSS3 Only

How to Create Mobile Screen using CSS and HTML ONLY ( do not use any images). Make it cross browser compatible.

Index.html

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
</head>
<body>
<div class="module">

<div class="container">
<div class="bubble">
Hello How r u ?
</div>

<div class="bubble bubble--alt">
I am very well u say
</div>

<div class="bubble">
I am also good?
</div>

<div class="bubble bubble--alt">
what r u doing?

</div>

<div class="bubble">
working some important work .
</div>
<div class="bubble bubble--alt">
Great :)

</div>
</div>
<div class="Home-Button">
<img src="logo.png"/>

</div>
</div>
</body>
</html>
Style.css

.container {
padding:10px 10px;
margin: 0 auto;
width: 220px;
}
/* .bubble */
.bubble {
background-image: linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -o-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -moz-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -ms-linear-gradient(bottom, rgb(210,244,254) 25%, rgb(149,194,253) 100%);
background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0.25, rgb(210,244,254)),color-stop(1, rgb(149,194,253)));
border: solid 1px rgba(0, 0, 0, 0.5);
border-radius: 20px;
box-shadow: inset 0 5px 5px rgba(255, 255, 255, 0.4), 0 1px 3px rgba(0, 0, 0, 0.2);
box-sizing: border-box;
clear: both;
float: left;

right: 46px;
margin-bottom: 20px;
padding: 8px 10px;
position: relative;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
width: auto;
max-width: 100%;
word-wrap: break-word;
}
.bubble:before, .bubble:after {
border-radius: 20px / 10px;
content: '';
display: block;
position: absolute;
}
.bubble:before {
border: 10px solid transparent;
border-bottom-color: rgba(0, 0, 0, 0.5);
bottom: 0;
left: -7px;
z-index: -2;
}
.bubble:after {
border: 8px solid transparent;
border-bottom-color: #d2f4fe;
bottom: 1px;
left: -5px;
}
.bubble--alt {
background-image: linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -o-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -moz-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -ms-linear-gradient(bottom, rgb(172,228,75) 25%, rgb(122,205,71) 100%);
background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0.25, rgb(172,228,75)),color-stop(1, rgb(122,205,71)));
float: right;
left: 4px;
}
.bubble--alt:before {
border-bottom-color: rgba(0, 0, 0, 0.5);
border-radius: 20px / 10px;
left: auto;
right: -7px;
}
.bubble--alt:after {
border-bottom-color: #ace44b;
border-radius: 20px / 10px;
left: auto;
right: -5px;
}
.module{

border: 5px solid #151618;
border-top-width:60px;
border-bottom-width:60px;
padding: 10px 40px;
background: #dbe1ed;
width: 198px;
height:359px;
border-radius: 25px;


}
.Home-Button img{
width:60px;
height:50px;
margin-left: 62px;
margin-top: 67px;

}
.top-head img{
width:40px;
height:13px;
}

                               



Tuesday, 10 February 2015

HTML CSS MENU


<style>

nav {
    position: absolute;
    left: 0;
    width: 100%;
    background-color:#938e82;

}
nav ul {
    margin: 0 auto;
    width: 940px;
    list-style: none;
}
nav ul li {
    float: left;
border-right: 1px solid #fff;
/*border-left: 1px solid #fff;*/
}

    nav ul li a {
        display: block;
        margin-right: 20px;
        font-size: 18px;
padding:20px 30px;
        line-height: 60px;
        text-align: center;
   text-transform: uppercase;
        text-decoration: none;
        color: #fff;
    }

        nav ul li:hover {
            background-color: #C2C1BE;
        }
   nav ul li.subscribe a {
               width: 100px;
               height: 60px;
               padding-right: 0px;
  margin-left: 17px;
               padding-left: 0px;
               text-align: left;
              background: url("images/home.png") left center no-repeat;
        }
</style>
<nav>
    <ul>
        <li class="subscribe"><a href="#"></a></li>
        <li><a href="#">About</a></li>
        <li><a href="#">Archives</a></li>
        <li><a href="#">Contact</a></li>
        <li><a href="#">Subscribe</a></li>
    </ul>
</nav>

Monday, 9 February 2015

How to create Click action Multi-level CSS3 Dropdown Menu..

/* demo page styles */
body {
background:#eee;
margin:0;
padding:0;
}
.example {
background:#fff url(../images/tech.jpg);
width:770px;
height:570px;
border:1px #000 solid;
margin:20px auto;
padding:15px;
border-radius:3px;
-moz-border-radius:3px;
-webkit-border-radius:3px;
}

/* main menu styles */
#nav,#nav ul {
background-image:url(../images/tr75.png);
list-style:none;
margin:0;
padding:0;
}
#nav {
height:41px;
padding-left:5px;
padding-top:5px;
position:relative;
z-index:2;
}
#nav ul {
left:-9999px;
position:absolute;
top:37px;
width:auto;
}
#nav ul ul {
left:-9999px;
position:absolute;
top:0;
width:auto;
}
#nav li {
float:left;
margin-right:5px;
position:relative;
}
#nav li a {
background:#c1c1bf;
color:#000;
display:block;
float:left;
font-size:16px;
padding:8px 10px;
text-decoration:none;
}
#nav > li > a {
-moz-border-radius:6px;
-webkit-border-radius:6px;
-o-border-radius:6px;
border-radius:6px;
overflow:hidden;
}
#nav li a.fly {
background:#c1c1bf url(../images/arrow.gif) no-repeat right center;
padding-right:15px;
}
#nav ul li {
margin:0;
}
#nav ul li a {
width:120px;
}
#nav ul li a.fly {
padding-right:10px;
}
/*hover styles*/
#nav li:hover > a {
background-color:#858180;
color:#fff;
}
/*focus styles*/
#nav li a:focus {
outline-width:0;
}
/*popups*/
#nav li a:active + ul.dd,#nav li a:focus + ul.dd,#nav li ul.dd:hover {
left:0;
}
#nav ul.dd li a:active + ul,#nav ul.dd li a:focus + ul,#nav ul.dd li ul:hover {
left:140px;
}


<link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
<div class="example">
<ul id="nav">
<li><a href="#">Home</a></li>
<li><a class="fly" href="#">Tutorials</a>
<ul class="dd">
<li><a href="">HTML / CSS</a></li>
<li><a class="fly" href="#">JS / jQuery</a>
<ul>
<li><a href="#">jQuery</a></li>
<li><a href="#">JS</a></li>
</ul>
</li>
<li><a href="#">PHP</a></li>
<li><a href="#">MySQL</a></li>
<li><a href="#">XSLT</a></li>
<li><a href="#">Ajax</a></li>
</ul>
</li>
<li><a class="fly" href="#">Resources</a>
<ul class="dd">
<li><a class="fly" href="#">By category</a>
<ul>
<li><a href="#">PHP</a></li>
<li><a href="#">MySQL</a></li>
<li><a class="fly" href="#">Menu1</a>
<ul>
<li><a href="#">Menu1</a></li>
<li><a href="#">Menu2</a></li>
<li><a class="fly" href="#">Menu3</a>
<ul>
<li><a href="#">Menu31</a></li>
<li><a href="#">Menu32</a></li>
<li><a href="#">Menu33</a></li>
<li><a href="#">Menu34</a></li>
</ul>
</li>
<li><a href="#">Menu4</a></li>
</ul>
</li>
<li><a href="#">Ajax</a></li>
</ul>
</li>
<li><a class="fly" href="#">By tag name</a>
<ul>
<li><a href="#">captcha</a></li>
<li><a href="#">gallery</a></li>
<li><a href="#">animation</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#">About</a></li>
<li><a href="#">Go Back To The Tutorial</a></li>
</ul>
</div>

Thursday, 8 January 2015

How to create responsive menu in css

index.html

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Navigation Menu</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
</head>
<body>
<label for="show-menu" class="show-menu">&#9776;</label>
<input type="checkbox" id="show-menu" role="button">
<ul id="menu">
<li><a href="#">Home</a></li>
<li>
<a href="#">About</a>
<ul class="hidden">
<li><a href="#">Who We Are</a></li>
<li><a href="#">What We Do</a></li>
</ul>
</li>
<li>
<a href="#">Portfolio </a>
<ul class="hidden">
<li><a href="#">Photography</a></li>
<li><a href="#">Web & User Interface Design</a></li>
<li><a href="#">Illustration</a></li>
</ul>
</li>
<li><a href="#">News</a></li>
<li><a href="#">Contact</a></li>
</ul>
</body>
</html>

Style.css

@charset "utf-8";
/* CSS Document */

ul {
list-style-type:none;
margin:0;
padding:0;
position: absolute;
}
li {
display:inline-block;
float: left;
margin-right: 1px;
}

li a {
display:block;
min-width:140px;
height: 50px;
text-align: center;
line-height: 50px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #fff;
background: #2f3036;
text-decoration: none;
}

li:hover a {
background: #19c589;
}

li:hover ul a {
background: #f3f3f3;
color: #2f3036;
height: 40px;
line-height: 40px;
}

li:hover ul a:hover {
background: #19c589;
color: #fff;
}

li ul {
display: none;
}

li ul li {
display: block;
float: none;
}

li ul li a {
width: auto;
min-width: 100px;
padding: 0 20px;
}

ul li a:hover + .hidden, .hidden:hover {
display: block;
}

.show-menu {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
text-decoration: none;
color: #fff;
background: #19c589;
text-align: right;
padding: 10px 0;
display: none;
padding-right:12px;

}
/*Hide checkbox*/
input[type=checkbox]{
display: none;
}
/*Show menu when invisible checkbox is checked*/
input[type=checkbox]:checked ~ #menu{
display: block;
}

/*Responsive Styles*/
@media screen and (max-width : 760px){

ul {
position: static;
display: none;
}

li {
margin-bottom: 1px;
}

ul li, li a {
width: 100%;
}

.show-menu {
display:block;
}
}


Friday, 2 January 2015

How we can swap page’s Background Image on Navigation Hover

How we can swap  page’s Background Image on Navigation Hover



<!DOCTYPE html>
<html>
<head>
<title>...</title>
</head>
<link href="default.css" rel="stylesheet" type="text/css"/>
<body>
<header>

</header>
<div class="container">
<nav>
<h1>Design By Naulej</h1>
<ul>
<li class="active">
<a href="#">Home</a>
<img src="images/rose.jpg" alt="">
</li>
<li>
<a href="#">About</a>
<img src="images/android.jpg" alt="">
</li>
<li>
<a href="#">Clients</a>
<img src="images/Blue_paint2.jpg" alt="">
</li>
<li>
<a href="#">Work</a>
<img src="images/work.jpg" alt="">
</li>
<li>
<a href="#">Contact</a>
<img src="images/crosshatch_woven_mat-background-colored-50-opacity-1024x768.jpg" alt="">
</li>
</ul>
</nav>

<img src="images/bydefault.jpg" alt="">
</div>

</body>
</html>

Style

@charset "utf-8";
/* CSS Document */
* {
margin: 0;
padding: 0;
}
body {
background:#666;
}

.container {
position: relative;
overflow: hidden;
margin: 100px auto;
width: 800px;
height: 500px;
-webkit-box-shadow: 10px 10px 10px rgba(0,0,0,0.3);
box-shadow: 10px 10px 10px rgba(0,0,0,0.3);
}
.container img {
position: absolute;
top: 0;
left: 0;
z-index: -60;
}

.container li img {
position: absolute;
top: 0;
left: 800px;
z-index: -50;
-webkit-transition: all 1s ease;
-moz-transition: all 1s ease;
-o-transition: all 1s ease;
-ms-transition: all 1s ease;
transition: all 1s ease;
}
nav {
width: 170px;
height: 500px;
background: #fff;
}
nav h1 {
padding: 20px;
color: #ccc;
text-align: right;
font: 25px Georgia, Times, serif;
}

ul {
width: 800px;
height: 500px;
list-style: none;
}
li a {
z-index: 1;
display: block;
padding-left: 20px;
width: 150px;
height: 30px;
background: white;
color: #444;
text-decoration: none;
font: 14px/30px Helvetica, Verdana, sans-serif;
}

li:nth-child(1) {
padding-top: 50px;
}
li a:hover {
background:#F00;
}

li a:hover + img {
left: 0px;
}

Display on Screen. look like.




how to rotate a image in css

Image rotate in css

Index.html

<html>
<head>
<title>....</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<body>
<center>
<a herf="" class="rotate"><img src="images/x-cart-ico.png" class="rotate"/></a>
<a herf="" class="rotate"><img src="images/magento-icon1.png" class="rotate"/></a>
<a herf="" class="rotate"><img src="images/opencart-logo1.png" class="rotate"/></a>
<a herf="" class="rotate"><img src="images/wordpress-icon.png" class="rotate"/></a>
</center>
</body>
</head>
</html>

style.css

.rotate{
-webkit-transition-duration: 0.8s;
-moz-transition-duration: 0.8s;
-o-transition-duration: 0.8s;
transition-duration: 0.8s;
-webkit-transition-property: -webkit-transform;
-moz-transition-property: -moz-transform;
-o-transition-property: -o-transform;
transition-property: transform;
overflow:hidden;
}

.rotate:hover
{
-webkit-transform:rotate(360deg);
-moz-transform:rotate(360deg);
-o-transform:rotate(360deg);
}


Thursday, 1 January 2015

Design a website using HTML5, CSS3 and Responsive

How we can design a website using HTML5, CSS3 and Responsive.

You can copy this code.

index.html

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ENGINEER YOUR LIFE</title>
<meta name="content-type" content=""/>
</head>
<link href="static/css/style.css" rel="stylesheet" type="text/css" />

<body class="body">
<header class="mainheader">
<img src="static/image/logo.PNG"/>
</header>
<nav>
<ul>
<li class="active"><a href="index.html">Home</a></li>
<li><a href="about.html">About Us</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Career</a></li>
<li><a href="#">Events</a></li>
<li><a href="#">Contact</a></li>
<ul>
</nav>
<div class="main_contain">
<div class="contain">
<article class="top_contain">
<header>
<h1 class="post_title">First Post</h1>
</header>
<footer>
<p class="post_info">This post by Naulej</p>
</footer>
<content>
<p>HTML or HyperText Markup Language is the standard markup language used to create Web pages.HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets . HTML tags most commonly come in pairs like and although some tags represent empty elements and so are unpaired, for example. The first tag in a pair is the start tag, and the second tag is the end tag (they are also called opening tags and closing tags).</p>
<p>A Web browser can read HTML files and compose them into visible or audible Web pages. The browser does not display the HTML tags and scripts, but uses them to interpret the content of the page. HTML describes the structure of a Website semantically along with cues for presentation, making it a markup language, rather than a programming language.</p>

</content>
</article>

<article class="bottom_contain">
<header>
<h2 class="post_title">Second Post</h2>
</header>
<footer>
<p class="post_info">This post by Naulej</p>
</footer>
<content>
<p>HTML or HyperText Markup Language is the standard markup language used to create Web pages.HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets . HTML tags most commonly come in pairs like and although some tags represent empty elements and so are unpaired, for example. The first tag in a pair is the start tag, and the second tag is the end tag (they are also called opening tags and closing tags).</p>
<p>A Web browser can read HTML files and compose them into visible or audible Web pages. The browser does not display the HTML tags and scripts, but uses them to interpret the content of the page. HTML describes the structure of a Website semantically along with cues for presentation, making it a markup language, rather than a programming language.</p>

</content>
</article>
</div>
</div>

<aside class="top_sidebar">
<article>
<h1>Top Sidebar</h1>
<p>HTML or HyperText Markup Language is the standard markup language used to create Web pages.</p>
</article>
</aside>

<aside class="middle_sidebar">
<article>
<h1>Middle Sidebar</h1>
<p>HTML or HyperText Markup Language is the standard markup language used to create Web pages.</p>
</article>
</aside>

<aside class="bottom_sidebar">
<article>
<h1>Bottom Sidebar</h1>
<p>HTML or HyperText Markup Language is the standard markup language used to create Web pages.</p>
</article>
</aside>

<footer class="main_footer">
<p>Copyright &copy:2015 First Design by <a href="http://phptututorials.blogspot.in/">Er Naulej Kumar</p>

</footer>
</body>
</html>

style.css

@charset "utf-8";
/* CSS Document */
body{
background-color:#CCC;
color:#000305;
font-size:14px;
font-family:Arial,'Lucida Sans Unicode';
line-height:1.5;
text-align:left;

}

.body{
margin: 0 auto;
width:70%;
clear:both;
}
.mainheader{
background-image:url(templete/Responsive/static/image/hedaer_banner.jpg);
width:100%;
height:200px;
}
.mainheader img{
width:30%;
height:130;
inherit:auto;
margin:2% 14px;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;

}
nav{
background-color:#666;
height:40px;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
}
nav ul{
list-style:none;
margin:0 auto;

}
nav ul li{
float:left;
display:inline;

}
nav a:link, nav a:visited{
text-decoration:none;
color:#fff;
display:inline-block;
padding:10px 25px;
height:20px;
}
nav a:hover, nav a:active,
nav .active a:link, nav .active a:visited{
background-color:#CF5C3F;
text-shadow:none;

}
nav ul li a{
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;

}

.main_contain{
line-height:25px;
border-radius:5px;
margin-top:2%;
-moz-border-radius:5px;
-webkit-border-radius:5px;

}
.contain{
width:70%;
float:left;
}
.top_contain{
background-color:#fff;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
padding:3% 5%;
margin-top:2%;

}
.bottom_contain{

background-color:#fff;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
padding:3% 5%;
margin-top:2%;
}

.post_info{
font-style:italic;

color:#999;

}

.post_title{
color:#CF5C3F;
}

.top_sidebar{
width:21%;
float:left;
margin-left:3%;
padding:2% 3%;
margin-bottom:2%;
margin-top:1.5%;
background-color:#fff;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;

}
.middle_sidebar{
width:21%;
float:left;
margin-left:3%;
padding:2% 3%;
margin-bottom:2%;
background-color:#fff;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;

}
.bottom_sidebar{
width:21%;
float:left;
margin-left:3%;
padding:2% 3%;
margin-bottom:2%;
background-color:#fff;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;

}
.main_footer{
width:100%;
height:40px;
float:left;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
background-color:#666;
margin-top:2%;

}

.main_footer p{
width:95%;
margin:1% auto;
text-align:center;
color:#fff;
font-family:Arial, Helvetica, sans-serif;

}
.main_footer p a{
color:#FF0;
text-decoration:none;

}

@media only screen and (min-width: 115px) and (max-width: 600px) {

.body{
width:90%;
font-size:95%;
}
.mainheader{
width:100%;
background-color: azure;
}
.mainheader img{
width:200px;
height:95px;
margin: 2% 13px;
}
nav{
height:250px;
}
nav ul{
padding-left:0px;

}
nav ul li{
width:100%;
text-align:center;


}
nav a:link, nav a:visited{
padding:10px 25px;
height:20px;
display:block;
}
.contain{
width:100%;
float:left;
margin:2%;
}
.post_info{
display:none;
}
.top_contain{
background-color:#fff;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
padding:3% 5%;
margin-top:2%;
margin-bottom:4%;

}
.bottom_contain{

margin-top:3%;
}


.top_sidebar{
width:95%;
float:left;
margin:2% 1% 2% 0;
padding:2% 3%;
background-color:#fff;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;

}
.middle_sidebar{
width:95%;
float:left;
margin:2% 1% 2% 0;
padding:2% 3%;
background-color:#fff;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
}
.bottom_sidebar{
width:95%;
float:left;
margin:2% 1% 2% 0;
padding:2% 3%;
background-color:#fff;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;

}

}

After use code you can see look like









Wednesday, 17 September 2014

File Upload Script in PHP

File Upload Script in PHP
<html>
<head>
<title>File Upload Script</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div>
<?php
if ( isset( $_FILES['fupload'] ) ) {
print "name: ". $_FILES['fupload']['name'] ."<br />";
print "size: ". $_FILES['fupload']['size'] ." bytes<br />";
print "temp name: ".$_FILES['fupload']['tmp_name'] ."<br />";
print "type: ". $_FILES['fupload']['type'] ."<br />";
print "error: ". $_FILES['fupload']['error'] ."<br />";
if ( $_FILES['fupload']['type'] == "image/gif" ) {
$source = $_FILES['fupload']['tmp_name'];
$target = "upload/".$_FILES['fupload']['name'];
move_uploaded_file( $source, $target );
$size = getImageSize( $target );
$imgstr = "<p><img width=\"$size[0]\" height=\"$size[1]\" ";
$imgstr .= "src=\"$target\" alt=\"uploaded image\" /></p>";
print $imgstr;
}
}
?>
</div>
<form enctype="multipart/form-data"
action="<?php print $_SERVER['PHP_SELF']?>" method="post">
<table
<tr>
<td><input type="hidden" name="MAX_FILE_SIZE" value="102400" /></td>
</tr>
<tr>
<td><input type="hidden" name="MAX_FILE_SIZE" value="102400" /></td>
</tr>
<tr>
<td><input type="file" name="fupload" /></td>
</tr>
<tr>
<td><input type="submit" value="upload!" /></td>
</tr>
</table>

</form>
</body>
</html>

Friday, 12 September 2014

HTML5 Input Element

HTML5 Input Element

We have discus HTML5 Input Element tag.you can following example of using radio buttons,labels, and submit buttons:

Example
<!DOCTYPE html>
<head><title>HTML5 Input Element</title></head>
<meta http http-equiv="keywords" content="How to create HTML5 Input Element"/>
<html>
<form action="#" method="post">
<p>
<label for="name">Name: </label>
<input type="text" id="name"><br />
<label for="address">Address: </label>
<input type="text" id="address"><br />
<label for="email">email: </label>
<input type="text" id="email"><br>
<input type="radio" name="sex" value="male"> Male<br>
<input type="radio" name="sex" value="female"> Female<br>
<input type="submit" value="send"> <input type="reset">
</p>
</form>
</html>

Saturday, 21 June 2014

how to create responsive menu using html5 and css3

how to create responsive menu using html5 and css3

In this example we have created responsive menu. First of all  we have design menu using for HTML5 and CSS3. In this example we have used desktop browse and we have also use mobile tab browser.
You can copy this code.  you can run this code.

Menu.html    

    <!DOCTYPE type>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="style.css" />
    <title>Untitled Document</title>
    <script>
     function showMenu()
    {
    //document.write("fj");
    if(document.getElementById("menu").style.display=="block")
    {
   document.getElementById("menu").style.display="none";
    }
   else
   document.getElementById("menu").style.display="block";
    }

   </script>

   </head> 

   <body>
   <button id="hk" onclick="showMenu()"> Show Menu </button>
   <nav class="nav">
   <ul class="nav-list" id="menu">
   <li class="nav-item"><a href="#">Home</a></li>
   <li class="nav-item"><a href="#">About</a></li>
   <li id="service" class="nav-item"><a href="#">Services</a>
   <ul id="service_items">
   <li><a href="#">Service A</a></li>
   <li><a href="#">Service A</a></li>
    <li><a href="#">Service A</a></li>
    <li><a href="#">Service A</a></li>
   <li><a href="#">Service A</a></li>
   </ul> 
   </li>
   <li class="nav-item"><a href="#">Portfolio</a>
   <ul id="service_items">
   <li><a href="#">Service A</a></li>
   <li><a href="#">Service A</a></li>
   <li><a href="#">Service A</a></li>
   <li><a href="#">Service A</a></li>
   <li><a href="#">Service A</a></li>
   </ul> 
  </li>
   <li class="nav-item"><a href="#">Testimonials</a>
    <ul id="service_items">
    <li><a href="#">Service A</a></li>
    <li><a href="#">Service A</a></li>
   <li><a href="#">Service A</a></li>
   <li><a href="#">Service A</a></li>
   <li><a href="#">Service A</a></li>
   </ul> 
   </li>
  <li class="nav-item"><a href="#">Contact</a></li>
   </ul>
   </nav>
   </body>
   </html>

style.css



@charset "utf-8";
/* CSS Document */


@media screen and (max-width: 820px)
{
ul
{
display:none;
}
ul li ul
{
list-style-type: none;
}
ul
{
list-style-type:none;
}

ul{display:none;}
ul li:hover ul
{
display:block;
}


.nav-item a {
display:block;
padding:15px 20px;
color:#FFF;
background:rgba(23,54,34,0.4);
}
.nav-item:first-child a {

}
.nav-item:last-child a {
border-radius:5px;
}
.nav-item a:hover {
background:#2C3E50;
}


ul li
{
margin:1px;
width:180px;
border-radius:5px;
}

ul li ul{margin-left:-40px; }
ul li ul li {
display:block;
padding:5px 5px;
color:#FFF;
background:#666666;
border:1px solid black;
}

}


/* Desktop CSS */
@media screen and (min-width: 821px)
{
ul li ul
{
list-style-type: none;
display:none;
}

ul li:hover ul
{
display:block;
}


#hk
{
display:none;
}
.nav {
position:relative;
display:inline-block;
font-size:14px;
font-weight:900;
}
.nav-list {

}
.nav-item {
float:left;
display:inline;
zoom:1;
}
.nav-item a {
display:block;
padding:15px 20px;
color:#FFF;
background:#34495E;
}
.nav-item:first-child a {
border-radius:5px 0 0 5px;
}
.nav-item:last-child a {
border-radius:0 5px 5px 0;
}
.nav-item a:hover {
background:#2C3E50;
}
ul li
{
width: 140px;
}
ul li ul{margin-left:-40px; }

ul li ul 
{
width: 90px;
}
ul li ul li a {
display:block;
padding:5px 5px;
color:#FFF;
text-decoration: none;
background:red;
border:1px solid black;
}

ul li ul li a:hover{ 
background:blue;
}
}

Desktop Screen output:
Mobile Screen output:

  

Sunday, 8 June 2014

How to display value in HTML5

How to display value in HTML5

In this example how to display value in html5. We have use html5 tag like " label" and " input type".We have displayed some text fields and submit bottom and we have css . we have used java script function.

form.html

<!Doctype html>
<html>
<head>
<style>

}
#header {
width:550px;
height: auto;
}
#header, h1 {
font-size: 30px; font-style: inherit; text-align: center;
display: block;
}
#form123
{
text-align: left; margin-top: 50px;

width: 550px;
height: auto;
margin: auto;

}

#form123 label, input, textarea {

width: 300px;
height: 40px;
display: block;
font-family: sans-serif;
font-size: 20px;
}
#sub {
margin-top: 15px;
width: 140px;

font-size:200px;
}
</style>

</head>
<body>
<div id="header">
<h1>Contact Form</h1>
</div>
<div id="form123" >

<form type=get action="page2.html">
<!--Name -->
<label for = "name">Name:<span class="star">*</span></label>
<input required type="text" name="name" id="name"></br>
<!--Address -->
<label for = "address">Address:<span class="star">*</span></label>
<textarea required id = "address" name="address"></textarea></br>
<!-- Password -->

<label for = "password">Password*</label>
<input type = "password" id = "password" name="password" required pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}" onChange="form.pwd2.pattern = this.value;"/>
<br/>

<label for="confirmPassword">Confirm Password*</label>
<input type = "password" id = "confirmPassword" name="confirmPassword" required pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{6,}"/>
<br/>
<label for="telephone">Contact Number <span class="star">*</span></label>
<input type = "Number" id = "telephone" name="telephone" required maxlength="10"/></br>

<input type = "submit" text = "Submit" id="sub"/>
</form>
</div>
</body>
</html>

page2.html

<!Doctype html>
<html>
<script LANGUAGE="JavaScript">
function getParams(){
var idx = document.URL.indexOf('?');
var params = new Array();
if (idx != -1) {
var pairs = document.URL.substring(idx+1, document.URL.length).split('&');
for (var i=0; i<pairs.length; i++){
nameVal = pairs[i].split('=');
params[nameVal[0]] = nameVal[1];
}
}
return params;
}
params = getParams();
name = unescape(params["name"]);
address = unescape(params["address"]);
password = unescape(params["password"]);
confirmPassword = unescape(params["confirmPassword"]);
telephone = unescape(params["telephone"]);
document.write("Name: = " + name + "<br>");
document.write("Address : = " + address + "<br>");
document.write("Password : = " + password + "<br>");
document.write("Confirm Password : = " + confirmPassword + "<br>");
document.write("Telephone : = " + telephone + "<br>");
</script>
</html>
 
Display Form  

Display value

Monday, 19 May 2014

How to Remove the Default Image Link in WordPress?

How to Remove the Default Image Link in WordPress?

you know that when you upload an image to WordPress media library, it creates multiple copies of the image in different image sizes. By default it adds a link to the image file. You can set this default link to none to remove the link, but doing it manually each time you upload an image is a little annoying. It is also annoying for users to click on an image and find the same image on the media page as well. Add this code in your theme’s functions.php file to remove default image link functionnality.

function wpb_imagelink_setup() {
$image_set = get_option( 'image_default_link_type' );

if ($image_set !== 'none') {
update_option('image_default_link_type', 'none');
}
}
add_action('admin_init', 'wpb_imagelink_setup', 10);

Saturday, 17 May 2014

How to start WordPress blog's

How to use WordPress Blog's

 In this video tutorial we have discus  How to start WordPress blog's . You can see full video tutorial after that you can start create site easy way.

WordPress Video Tutorials

 WordPress Video Tutorials

In this tutorial we have provided you with detailed instructions on how to use WordPress to create and manage your site. WordPress can be used for both simple and complex websites. In our WordPress tutorial we have tried to cover all the basics and few advanced topics.
you can see full video tutorials.


Wednesday, 26 March 2014

Fibonacci series program in php

Fibonacci series program in php

// Fibonacci series program in php?.
 //In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation.
Example

<html>
<head>
<title>Fibonacci series program in php</title>
</head>
<body>

 <?php
  $count= 0;
 $x = 0;
 $y = 1;
 echo $x."<br/>";
 echo $y."<br/>";
 while($count<10){
 $z = $x + $y;
    echo $z."<br />";
    $x = $y;
    $y = $z;
    $count ++;
 }
?>
</body>
</html>
output:
0
1
1
2
3
5
8
13
21
34
55

89

Monday, 24 March 2014

Prime numbers in between a range of 100

Program to find prime numbers in between a range of 100

Prime Number example in PHP. We will print the prime number between a range of 100.The prime number is not divisible by 2 only divisible by 1 and itself.

Example
    <html>
     <head>
      <title>PHP Prime Numbers</title>
         </head>
          <body>
     <?php
       error_reporting(E_ALL);
         //Program to find prime numbers in between a range of 100
        $num =100;
          for( $j = 2; $j <= $num; $j++ )
            {
        for( $k = 2; $k < $j; $k++ )
       {
           if( $j % $k == 0 )
       {
         break;
        }
        }
           if( $k == $j )
          echo "Prime Number : ", $j, "<br>";
          }
        ?>
</body>
</html>

Output
Prime Number : 2
Prime Number : 3
Prime Number : 5
Prime Number : 7
Prime Number : 11
Prime Number : 13
Prime Number : 17
Prime Number : 19
Prime Number : 23
Prime Number : 29
Prime Number : 31
Prime Number : 37
Prime Number : 41
Prime Number : 43
Prime Number : 47
Prime Number : 53
Prime Number : 59
Prime Number : 61
Prime Number : 67
Prime Number : 71
Prime Number : 73
Prime Number : 79
Prime Number : 83
Prime Number : 89
Prime Number : 97

Reverse String, without strrev()

Reverse String, without strrev()

In this example we have discus how to print  Reverse String, without strrev() function .Fist off all we Assign the given string to the variable and Calculate the length of the string. We use Iterate the string using for loop with appropriate looping and count Concatenate the string inside the for loop. you can see below example.

Example

   <html>
   <head>
   <title>Reverse</title>
   </head>
    <body>
    <?php
            $string = 'Hello php';
                 $length = strlen($string);
           for ($i=($length-1) ; $i >= 0 ; $i--) {
       echo $string[$i];
       }
      ?>
</body>
</html>

Output:  php olleH

PHP strrev() Function

We can also print without loop

< html>
<html>
<body>

<?php
     echo strrev("Hello World!");
     ?>

</body>
</html>

How to reverse a number in php without built(strrev()) in functions

In this example First off all we get the given number and extract the final digit. Initially the reverse of the number will be zero, on each iteration multiply the reverse with 10 and add the modulus result.you can see below example.

Example

 <html>
 <head>
 <title>reverse number</title>
 </head>
 <body>
      <?php
               $number = 1234; $x =0; $y =0;
                  $originalnum = $number;
                  while($number > 1) {
            $x = $number %10;
              $y = ($y * 10)+ $x;
             $number = $number /10;
           }
          Echo "Original Number: ". $originalnum;
          Echo " Reverse : ". $y;
          ?>
</body>
</html>

Output: Original Number: 1234 Reverse : 4321 

Sunday, 16 March 2014

Insert Data From a Form Into a Database

User Registration Form with DataBase

In this example we have discus how to Insert Data From a Form Into a Database. First all we have created HTML From and we display some "text" fields and radio Button. we have also use form validation and we use JavaScript function which is called on checkForm(form).when we click the submit button in the HTML From,the form data is sent to "insert.php".The "insert.php" file connects to a database, and retrieves the values from the form with the PHP $_POST variables.Then, the mysqli_query() function executes the INSERT INTO statement, and a new record will be added to the "Persons" table.

Example

form.html
<html>
<head>
<title>User Registration Form</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<h1 align="center">User Registration Form with DataBase</h1>
<script type="text/javascript">

  function checkForm(form)
  {
    if(form.firstname.value == "") {
      alert("Error: FirstName cannot be blank!");
      form.firstname.focus();
      return false;
    }
if(form.lastname.value == "") {
      alert("Error: LastName cannot be blank!");
      form.lastname.focus();
      return false;
    }
if(form.address.value == "") {
      alert("Error: Address cannot be blank!");
      form.address.focus();
      return false;
    }
if(form.city.value == "") {
      alert("Error: City cannot be blank!");
      form.city.focus();
      return false;
    }
if(form.pincode.value == "" ||
           isNaN(form.pincode.value) ||
           form.pincode.value.length != 6 )
   {
     alert( "Please provide a pincode in the format ######." );
     form.pincode.focus() ;
     return false;
   }
 if( form.country.value == "-1" )
   {
     alert( "Please provide your Country!" );
     form.country.focus() ;
     return false;
   }

  if(form.mobileno.value == "" ||
           isNaN( form.mobileno.value) ||
           form.mobileno.value.length != 10 )
   {
     alert( "Please provide a Mobile No in the format 123." );
     form.mobileno.focus() ;
     return false;
   }

if ( ( form.sex[0].checked == false ) && ( form.sex[1].checked == false ) )
   {
   alert ( "Please choose your Gender: Male or Female" );
   return false;
   }
 
if(form.age.value == "") {
      alert("Error: Age cannot be blank!");
      form.age.focus();
      return false;
    }
var email = form.emailid.value;
  atpos = email.indexOf("@");
  dotpos = email.lastIndexOf(".");
 if (email == "" || atpos < 1 || ( dotpos - atpos < 2 ))
 {
     alert("Please enter correct email ID")
     form.emailid.focus() ;
     return false;
 }
if(form.pwd1.value != "" && form.pwd1.value == form.pwd2.value) {
      if(form.pwd1.value.length < 6) {
        alert("Error: Password must contain at least six characters!");
        form.pwd1.focus();
        return false;
      }
      if(form.pwd1.value == form.username.value) {
        alert("Error: Password must be different from Username!");
        form.pwd1.focus();
        return false;
      }
      re = /[0-9]/;
      if(!re.test(form.pwd1.value)) {
        alert("Error: password must contain at least one number (0-9)!");
        form.pwd1.focus();
        return false;
      }
      re = /[a-z]/;
      if(!re.test(form.pwd1.value)) {
        alert("Error: password must contain at least one lowercase letter (a-z)!");
        form.pwd1.focus();
        return false;
      }
      re = /[A-Z]/;
      if(!re.test(form.pwd1.value)) {
        alert("Error: password must contain at least one uppercase letter (A-Z)!");
        form.pwd1.focus();
        return false;
      }
    } else {
      alert("Error: Please check that you've entered and confirmed your password!");
      form.pwd1.focus();
      return false;
    }

    alert("You entered a valid password: " + form.pwd1.value);
    return true;
  }

</script>

<body bgcolor="#9999FF" text="#000000" leftmargin="30">
<strong>
<table align="center" border="1">
<form action="insert.php" method="post" onsubmit="return checkForm(this);">
<tr>
<td>FirstName</td>
<td><input type="text" name="firstname" size="30"></td>
</tr>
<tr>
<td>LastName</td>
<td>  <input type="text" name="lastname" size="30"></td>
</tr>

<tr>
<td>Address</td>
<td> <input type="text" name="address" size="30"></td>
</tr>

<tr>
<td>City</td>
<td>  <input type="text" name="city" size="30"></td>
</tr>

<tr>
<td>Pincode</td>
<td> <input type="text" name="pincode" size="30"></td>
</tr>

<tr>
<td>Country</td>
<td><select name="country">
           <option value="-1" selected>select..</option>
           <option value="india">India</option>
           <option value="usa">USA</option>
           <option value="canada">Canada</option>
           <option value="pakistan">Pakistan</option>
           </select></td>
</tr>

<tr>
<td>Mobile No</td>
<td> <input type="text" name="mobileno" size="30"></td>
</tr>

<tr>
<td>Gender</td>
<td><input type="radio" name="sex" value="Male"> Male
                   <input type="radio" name="sex" value="Female"> Female</td>
</tr>

<tr>
<td>Age</td>
<td>  <input type="text" name="age" size="30">    </td>
</tr>
<tr>
<td>Email Id</td>
<td> <input type="text" name="emailid" size="30"> </td>
</tr>

<tr>
<td>Password:  </td>
<td>  <input type="password" name="pwd1" size="30"></td>
</tr>
<tr>
<td>Confirm Password:  </td>
<td><input type="password" name="pwd2" size="30"></td>
</tr>

<tr>
<td></td>
<td>  <input type="submit"/></td>
</tr>
</form>
</table>
</strong>
</body>
</html>

insert.php

       <htm>
      <head>
      <title>inserData</title>
      </head>

       <body>
      <?php
          $con=mysqli_connect('localhost','root','','userregistraion');
         // Check connection
         if (mysqli_connect_errno())
         {
      echo "Failed to connect to MySQL: " . mysqli_connect_error();
     }

          $sql="INSERT INTO userinformation (FirstName, LastName, Address, City, 
            PinCode, Country, MobileNo, Sex, Age, Emailid, Pwd1, Pwd2)VALUES
          ('$_POST[firstname]','$_POST[lastname]','$_POST[address]','$_POST[city]','$_POST[pincode]','
 $_POST[country]','$_POST[mobileno]','$_POST[sex]','$_POST[age]','$_POST[emailid]',                  '$_POST[pwd1]','$_POST[pwd2]')";

       if (!mysqli_query($con,$sql))
      {
         die('Error: ' . mysqli_error($con));
          }
          echo "1 record added";

         mysqli_close($con);
                ?>

         </body>
        </html>

Output:


SQL result:-



Tuesday, 11 March 2014

create table in mysql php example

How to create table in mysql php example

In this example we have created table in MySQL PHP. We have created  table UserInformation "FirstName", "LastName" ,"Address" ,"Age"). We have added the CREATE TABLE statement to the mysqli_query() function to execute the command.

MySQL Syntax:-
$sql="CREATE TABLE UserInformation(FirstName CHAR(30),LastName CHAR(30),Address CHAR(50),Age INT)";

Example:

<html">
<head>
<title>Create Table</title>
</head>
<body>
<?php

$connection=mysqli_connect('localhost','root','','naulej');
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
// Create table
$sql="CREATE TABLE UserInformation(FirstName CHAR(30),LastName CHAR(30),Address CHAR(50),Age INT)";
// Execute query
if (mysqli_query($connection,$sql))
{
echo "Table UserInformation created successfully";
}
else
{
echo "Error creating table: " . mysqli_error($connection);
}
?>
</body>
</html>

Output:-




















Error creating table