物件導向著樣打是對的嗎?

edited 八月 2014 in PHP新手區
<head>
<title>
</title>
</head>
<meta http-equiv="content-type" content="text/html;charset=utf8" >
<html>
<CENTER>
<form name="form1" method="post" >
<input type="text" name="name" width="100" high="5">
<input type="submit" name="send" value="送出">
<?PHP
class information{
 var $name;
  function information(
 $input_name)
 {
 $this->name=$input_name;
 
 }
 }
 $used_information1=new information(
 $input_name
 );
 echo"你輸入的資料<br>";
 echo"姓名:<br>".$used_information1->name;
 


?>
</form>

</html>
==================================
$used_information1=new information(
$input_name
); 著一段一直顯是錯誤我不知道如何修改他,求解,謝謝

評論

Sign In or Register to comment.