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

restricting another login once you logout
Hello,

how can I restrict a page from login authenticating against info in a MySQL DB for a s

Problem displaying "scraped" XML data
I'm basicly having trouble displaying XML data scraped from an URL using cURL.

What the code

AJAX form submit
I recently built a form that submits data to my database with an ajax function that is called throug

double and single quotes in text fields acting up... help please
Single quotes, when entered into a text field, create an sql error upon Submit. It seems to create t

Progress bar tracking file downloads
Hey guys, was wondering if there was a way to track how far a file has been downloaded. I know there

Error in query: Resource id #4??
hey guys, having a minor (i think) problem here that i havent been able to figure out. long story sh

max function question
Hi All
Ihave a table that holds shipment numbers and dates like this

select * from

add to sql result
ok see rite now my sites hit counter is counted from the mysql visitor log i need to clear it aft

Internal class functions don't seem to get executed.
Hi. Can someone please put me out of my misery on this. I don't write much PHP and this has me baffl

Losing 'page' data
I have this code that allows me to update my database. But after updating, I lose the $_GET['page']

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