php calculate


Posted on 16th Feb 2014 07:03 pm by admin

this code echoes correctly the sum but the inserted result is 0??
Code: <?php
$TotalNumberAdults=$_POST['TotalNumberAdults'];
$TotalNumberChildren=$_POST['TotalNumberChildren'];
$TotalNumber=($TotalNumberAdults + $TotalNumberChildren);

?><?php echo sprintf($TotalNumber);?>
<input name="TotalNumber" type="hidden" value="<?php echo sprintf($TotalNumber);?>" size="7">

No comments posted yet

Your Answer:

Login to answer
254 Like 25 Dislike
Previous forums Next forums
Other forums

Hotlinking Picasa as the image folder of a website
Hi there PHP freaks, I would like to create a private album in Picasa to use it as the image folder

Can't seem to capture a variable in a chained select
I'm *this* close to having a chained select running but for some reason it doesn't seem to be pickin

function to return url
Hi,

Can you guys help me giving a function that takes all the contents in a particular field

Captcha problem users just refresh and it will let them auto submit again
Users will just re submit and not have to enter the new captcha.. ? Lol but if i refresh the page, t

Confused with Loop
guys, i got confused with Looping...this is the case

I have 3 stocks, let say "Stock A&q

UDP Multicast question
Hey,

Im not really in the know when it comes to network related programming and activitie

The control with ID 'ace' requires a ScriptManager on the page
I'm trying to add a simple AlwaysVisibleControlExtender to my page, but it's not working. I get the

Issue Parsing XML into table
Hello all,

Im a bit new to php and new to phpfreaks. But thanks in advance for the help!
<

Need help with an email blocker for a guessbook
I am new with php and here is a simple guessbook page but I am being hit with spam from a group of t

Perplexing problem showing a .jpg
Please disregard..........I figured it out

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash