php提交表单后出现http500异常
程序员文章站
2024-02-07 15:03:58
...
php提交表单后出现http500错误
新手,刚接触php,麻烦各位大神了
html部分
Popcorn sales
php程序
Process the popcorn.html form
$unpop=$_post["unpop"];
$caramel=$_post["caramel"];
$caramelnut=$_post["caramelnut"];
$toffeynut=$_post["toffeynut"];
$name=$_post["name"];
$street=$_post["street"];
$city=$_post["city"];
$payment=$_post["payment"];
if($unpop=="") $unpop=0;
if($caramel=="") $caramel=0;
if($caramelnut=="") $caramelnut=0;
if($toffeynut=="") $toffeynut=0;
$unpop_cost=3.0*$unpop;
$caramel_cost=3.5*$caramel;
$caramelnut_cost=4.5*$caramelnut;
$toffeynut_cost=5.0*$toffeynut;
$total_price=$unpop_cost+$caramel_cost+$caramelnut_cost+$toffeynut_cost;
$total_items=$unpop+$caramel+$caramelnut+$toffeynut;
?>
print("$name
$street
$city
");
?>
新手,刚接触php,麻烦各位大神了
html部分
php程序
$unpop=$_post["unpop"];
$caramel=$_post["caramel"];
$caramelnut=$_post["caramelnut"];
$toffeynut=$_post["toffeynut"];
$name=$_post["name"];
$street=$_post["street"];
$city=$_post["city"];
$payment=$_post["payment"];
if($unpop=="") $unpop=0;
if($caramel=="") $caramel=0;
if($caramelnut=="") $caramelnut=0;
if($toffeynut=="") $toffeynut=0;
$unpop_cost=3.0*$unpop;
$caramel_cost=3.5*$caramel;
$caramelnut_cost=4.5*$caramelnut;
$toffeynut_cost=5.0*$toffeynut;
$total_price=$unpop_cost+$caramel_cost+$caramelnut_cost+$toffeynut_cost;
$total_items=$unpop+$caramel+$caramelnut+$toffeynut;
?>
Customer:
print("$name
$street
$city
");
?>
Product | Unit Price | Quantity Ordered | Item Cost |
---|---|---|---|
Unpopped Popcorn | $3:00 | ||
Caramel Popcorn | $3:50 | ||
Caramel Nut Popcorn | $4:50 | ||
Toffey Nut Popcorn | $5:00 |
网友评论
文明上网理性发言,请遵守 新闻评论服务协议
我要评论