Why when submit is pressed, and number of tickets is 3 or higher I am not geting displayed echo?
echo "You choose $place and $tickets tickets, and you get discount 50%, total price is $totalprice";
Thanks in advance
<?php
$selection=$_POST['selection'];
if(isset($selection) and $selection=="submit"){
$place=$_POST['place'];
$tickets=$_POST['tickets'];
$totalprice = $price * $tickets;
if ($place == balkon) {
$price = 10; }
elseif ($place == prvaloza) {
$price = 8; }
elseif ($place == drugaloza) {
$price = 6; }
elseif ($place == parter) {
$price = 4; }
elseif ($tickets >= 3 ) {
$totalprice = $totalprice / 2;
echo "You choose $place and $tickets tickets, and you get discount 50%, total price is $totalprice";
}
}
?>
<form method=post name=tickets action=''><input type=hidden name=selection value=submit>
<table border="0" cellspacing="0" >
<tr><td align=left >
<select name=place value=''>Choose place</option>
<option value='balkon'>Balkon</option>
<option value='prvaloza'>Prva loza</option>
<option value='drugaloza'>Druga loza</option>
<option value='parter'>Parter</option>
</select>
</td><td align=left >
Broj karata<input type=text name=tickets size=4>
<input type=submit value=Select>
</table>
</form>