物件導向我收不到值,到的哪裡打錯

edited 八月 2014 in PHP新手區
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"
>
</head>
<center>
<body>
<form name="form1" method="post" enctyp="mutipark/form-dat" >

<head>身高體問卷到查表</head><br>
姓名:<input type="text" name="username" size="10"><br>
年齡:
<input type="radio" name="age"  value="age1"> 0~20
<input type="radio" name="age"  value="age2">20~40
<input type="radio" name="age"  value="age3">40~60
<input type="radio" name="age"  value="age4">60上
<br>
身高:<input type="text" name="userhigh" size="10"><br>
體重:<input type="text" name="userwight" size="10"><br>
學歷:<input type="text" name="usereducation" size="10"><br>
<input type="submit" value="送出" >
<input type="reset" value="重設">
<?php
$name=$_POST["username"];
$high=$_POST["userhigh"];
$wight=$_POST["userwight"];
$education=$_POST["usereducation"];
 switch($_POST["age"])
   {
   case"age1";
$age="0~20";
break;
case"age2";
$age="20~40";
break;
case"age3";
$age="40~60";
break;
case"age4";
$age="60上";
   }
class school
{
 var $name;
 var $age;
 var $high;
 var $wight;
 var $education;
 function school($input_name,$input_age,$input_high,$input_wight,$input_education)
 {
  $this->$name=$input_name;
  $this->$age=$input_age;
  $this->$high=$input_high;
  $this->$wight=$input_wight;
  $this->$education=$input_education;
 }
}
$used_school1= new school($name,$age,$high,$wight,$education);
echo("姓名".$used_school1->name."<br>");
echo("年齡".$used_school1->age."<br>");
echo("身高".$used_school1->high."<br>");
echo("體重".$used_school1->wight."<br>");
echo("學歷".$used_school10>education."<br>");

?>

</form>
</body>
$this->$name=$input_name;她為什麼一直顯示著行錯誤,收不到回傳值

評論

Sign In or Register to comment.