Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Tuesday, January 17, 2012

Switch_Statement

A switch statement is used to display the correct prompt.
which is depending on the types submitted.Links are generated to conforms the dletye proceess.
The link ito conform the process diects back to current page with the same URL.


EXAMPLE OF CODE




1)Sunday
2)Monday
3)Tuesday
4)Wednesday
5)Thursday
6)Friday
7)Saturday







<?php
$day=$_post ['num'];

switch($day){

case'1':

echo"Sunday";

break;

case'2':

echo"monday";

break;

case'3':

echo"Tuesday";

break;

case'4':

echo"Wedneday";

case'5':

echo"Thursday";

break;

case'6':

echo"Friday";

break;

case'7':

echo"Saturday";

break;

default:

echo"invalid number";

}
?>


























































SEO LINK BUILDING
IMPORTANT OF KEYWORD
INCREASE TRAFFIC YOUR BLOG
BOOST YOUR BACKLINKS WITH ARTICLES SUBMISSION

Monday, November 7, 2011

If and Else Statement

The if and else statements can be very helpful in controlling the power and resulting output of your scripts.You can input your site with basically unlimitited possibilities.You can diffrent massage based on different content or persone's.

EXAMPLE OF CODE

<?php
$ages=45;
if($ages=1 && $ages<=4){
echo "Infant";
}else if($ages=5 && $ages<=12){
echo "child";
}else if($ages=13 && $ages<=19){
echo "Teen";
}else if($ages=20 && $ages<=40){
echo "Youth";
}else if($ages=41 && $ages<=60){
echo "adult";
}else{
echo "Enter correct value";
}
?>

Wednesday, October 19, 2011

Date_Profile_on_PHp_Example

PHP is a called Personal Home Page server-side scripting language originally designed for web development to produce dynamic web pages.
I wanna just piece of code on date profile on PHp.Which basic idea about php.This is very simple and very handy.

EXAMPLE OF CODE



<?php

if(isset($_POST['submit'])){

$name = $_POST['name'];

$year = $_POST['year'];

$sex = $_POST['sex'];

$curr_year=2011;

$age=$curr_year-$year;
echo $name . "<br />". $year . "<br />". $sex;
/*if($name=='binod'){

echo"<h1>welcome sir</h1> ";

}

else{

echo"<h2>you are not binod </h2>";

}



if($year=='2000'){

echo"thankyou";
}

else{

echo"You are not envited";

}*/

if($sex=='male'){

echo"Hello Sir";

}

else{

echo"Hello Mam";

}



}

?>

<form method="post"="dataprofile.php">

NAME*:<input type="text" name="name"> <br />

DATE OF YEAR*:<input type="year" name="year" maxlength='4'/><br />

<input type="radio" name="sex" value="male" />Male <input type="radio" name="sex" value="female" />Female <br />

<input type="submit" name="submit"value="Submit" />

</form>



Another-popularity-your-link-by-message-boards-and-discussion-lists
Free-create-back-link
Meta-tag-generator-for-seo
Tips-4blog-posting
How-to-optimization-your-website-best-secret-of-seo
Online-promotion-for-blogger
Seo-tips_for Blogger
Seo_on_link_building


Wednesday, September 14, 2011

OOP dreams





Object-oriented Programming (OOP) focuses on building programs from a set of 'smart' custom data types.This code helps save your time and makes it easier to reuse your code share it with others.I'll quick run through the syntax that is associated with OOP in PHP.You must understand the most basic concepts behind OOP.


>?php
$mybox=new Box('Rajesh');
echo $mybox ->get_what_is_inside();
?>









The variable $mybox stores a reference to a special 'smart'box built by new.

Tuesday, September 13, 2011

HTML_inside_PHP

You have to check for double quotation marks.Using the ECHO statement may involve the use of double quotation marks because HTML also uses double quotation marks,you can do one of two things to avoid problems:

Escape your HTML double quotation marks with a backslash,as in the following:
echo"<p style=\"font-size:80%;\">";



Use single quotation marks around your html.This can help improve the readability of your code if you have many quotes:

echo'<p style="font-size:80%;">';



Remember that you have still to follow's rules:Follow the PHP guidelines and end your sentences with a semicolon,as well as close all quotes.


Don't try cram too much HTML into your PHP:

EXAMPLE:

<?Php
echo'<table style="font-family:Arial,sans-serif;font-size:80%;';
echo'width:100%">';
echo'<tr>';
echo'<td style="width:50%;">';
echo'First Name:';
echo'</td>';
echo'<td style="width:50%">';
echo $_POST['fname'];
echo'</td>';
echo'</tr>';
echo'</table>';
?>


Php was really needed for was to provided the value represented by $_POST['fname'] and display it on the screen.The rest of the related code was just to output HTML.In this case ,You're better off just staying in HTML and pulling out the PHP line when you need it.

PHP_server-side-scripting_language




PHP is a server-site-scripting language that allows your web site to be fantastic Dynamic.PHP stands for PHP:Hypertext Preprocceser.It's OPEN SOURCE language.It's flexible and relative small learning curve(especially for programmer who have a backgroundin other programming languages like,JAVE AND PERL)make its one of the most popular scripting language programming used today.



PHP's popularity continues to increase as business individuals everywhere like,blogs and E_COMMERCE site.You can follow the rules on the site at WWW.PHP.NET.

Blogs 4 seo/blogspot seo|blogs best 300x250 banners Copyright © 2011 -- Template created by O Pregador -- Powered by Blogger

Web Statistics