I am trying to get rid of the index undefined. Every time I click submit without ticking the box, I get an undefined index error.
<html>
<head>
<title>Order</Title>
<style>
</style>
<body>
<form action = "order.php" method = "post">
Coffee:<p>
<input type = "checkbox" value = "coffee" name = "cappuccino"/>Capuccino<br>
</form>
</body>
</head>
</Html>
<?php
$capuccino = 3.75;
if(isset($_POST["submit"]))
{
if($_POST['cappuccino'] <> 'coffee')
{
$capuccino = 0;
}
}
?>