Having problems ouput the total

I was trying to let the user choose the travel package they want and automatically output the total in the amount textfield but nothing has displayed. Why?

[php]

Untitled Document <?php $tour["Kl tour"]=288; $tour["Sabah"]=688; $tour["Redang"]=388; ?> Package: KL tour Sabah Redang

Amount:

[/php]

<input type=‘text’ name=‘tour_price’ value=’<?=(isset($tour['Kl tour']) ? $tour['Kl tour'] : '')?>’ />

change what’s between the brackets to output the correct value. You could also do it with the javascript you have there, but I don’t know how to do it, other than with document.write().

Edited by Seb: corrected a typo in the code

Sponsor our Newsletter | Privacy Policy | Terms of Service