I'm making travel package website and I want to retrieve data using either GET, POST , REQUEST in php. but I get an error message saying "Array ( ) no Notice: Undefined index:"
Javascript function:
calculate total by simply multiplying the values from "package" and "# of person"
below is my code
<script type="text/javascript">
function totalPrice(){
document.getElementById("total").value= "CAD "+
(document.getElementById("package").value * document.getElementById("person").value);}
</script>
<!-- package selection -->
<form action="test.php" method="get">
<select id="package" onchange="totalPrice();" >
<option value="2300">Wild West (Banff, Jasper)</option>
<option value="3300">East Coast(St.Johns)</option>
<option value="1300">Winery Tour(Kelowna, Penticton)</option>
<option value="2600">Northern Light(Yellowknife)</option>
</select>
<select id="person" onchange="totalPrice();">
<option value="1">1 person</option>
<option value="2">2 persons</option>
<option value="3">3 persons</option>
<option value="4">4 persons</option>
<option value="5">5 persons</option>
<option value="6">6 persons</option>
<option value="7">7 persons</option>
<option value="8">8 persons</option>
</select>
<input type="submit">
</form>
<!-- total Amount -->
<label class="form" >Total Amount</label>
<input size =40 type="text" name="total" id="total" disabled>
"test.php"
<h1>payment total</h1>
<?php
print_r($_GET);
if(!isset($_GET['total'])){
echo "no";
}
echo $_GET['total'];
?>