php oop
for the 1st problem i tried as
//oop1.html
<html>
<body>
<form method="post" action="oop.php">
enter the first number:
<input name="no" type="text"/><br/>
enter the second number:
<input name="not" type="text"/><br/>
<input type="submit"/>
</form>
</body>
</html>
and the file oop.php is
<html>
<body>
<?php
class p1{
var $one=$_POST["no"];
var $two=$_POST["not"];
function getone(){
echo $this->one ."<br/>";
}
function gettwo(){
echo $this->two ." <br/>";
}
}
$on=new p1();
$tw=new p1();
$on->getone();
$tw->gettwo();
?>
</body>
</html>
can you please tell me whats wrong with it?
thanking you,
nishant gaurav