Http500 exception occurs after PHP submits the form

Source: Internet
Author: User
Tags php print
http500 error occurred after PHP submitted form

Novice, just contact PHP, trouble you Big God
HTML section


<title>Popcorn Sales</title>







PHP Program


<title>Process the popcorn.html form</title>


$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
");
?>
































  • Order information
    Product Unit price Quantity Ordered Item cost
    unpopped Popcorn $ !--? php print ("$unpop"),?--> !--? php printf ("$%4.2f", $unpop _cost);?--"
    Caramel Popcorn $3:50 !--? php print ("$caramel");?--> !--? php printf ("$%4.2f", $caramel _cost),?--"
    Caramel Nut Popco RN $4:50 !--? php print ("$caramelnut"),?--> !--? php printf ("$%4.2f", $car Amelnut_cost);?-->
    Toffey Nut popcorn $5:00 !--? p HP print ("$toffeynut"),?--> !--? php printf ("$%4.2f", $toffeynut _cost);?--"
    Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.