Advertisement.

TransHimalaya.in

Everest Helicopter Tour for a day

Book exciting packages at www.transhimalaya.in

php basics

Code for index1.php
              <html>
<body>
<?php
echo "hello world <br/>";
$str1 = "vinod";
$str2 = "kotiya";
echo $str1." ".$str2;
if (time()%2 == 0)
echo " <br/> Even Time is " . time();
else
echo "<br/> Odd time is " . time();

for($i=0; $i < 5 ; $i++)
echo "<br/> value of i is " . $i;

echo "<br/> Add : " . add(2,3);
function add($i,$j)
{
return $i+$j;
}

?>
<form action="index2.php" method="post">
Name : <input type="text" name="name" /><br/>
Last Name: <input type="text" name="lname" /><br/>
<input type="submit" value="send" />
</form>
                  </body>
</html>
code for index2.php


<html>
<body>
<?php
echo "your name is " . $_POST["name"];
echo "<br/> surname is " . $_POST["lname"];
?>
</body>
</html>

Comments

Most Viewed Post

solution for facebook static.ak.fbcdn.net waiting

Connect Sony XPLOD MEX-BT2500 Bluetooth CD Receiver with ur mobile

Crystal Report : Show data horizontally (Left to right) i.e. columns as rows

Google+ Followers