Showing posts with label post.php. Show all posts
Showing posts with label post.php. Show all posts

Sunday, 30 March 2014

PHP TUTORIALS-POST METHOD

PHP TUTORIALS SESSION 3 POST METHOD WITH EXAMPLE PROGRAM 



HTML Program Name:- htmlpost1.html

<html>

<head>

<body>

<h1><center>Post Method</center></h1>

<form action="post1.php" method="post">

Name:<input type="text" name="name">

Email:<input type="text" name="email">

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

</form>

</body>

</head>

</html>


PHP Program Name:- post1.php


Welcome <?php echo $_POST["name"];?>

Your email id is:<?php echo $_POST["email"]; ?>


JAVA PROGRAMS-Interface Demo program in java

Interface Demo program in java

Program Name:- inter1

import java.io.*;

interface demo

{

final double pi=3.14;

abstract double area(int r);

}

interface demo1

{

abstract double circum(int r);

}

class cir implements demo,demo1

{

public double area(int r)

{

return pi*r*r;

}

public double circum(int a)

{

return 2*pi*a*a;

}

}

class inter1

{

public static void main(String arg[])

{

cir c=new cir();

System.out.print("\nCircle\t:"+c.area(5));

System.out.print("\nCircum\t:"+c.circum(5));

}

}