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'];
Did you know?Explore Trending and Topic pages for more stories like this.
$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

problem with array - multilingual page
this is my test page :
Code: <?php
if(isset($_GET['lang'])) {
if($_GET['la

TemplatePower & AJAX
Hi all,



I'm currently implementing some AJAX features in my PHP-framework (which is b

Gantt Chart Tool
Does anyone know of a good free gantt chart creator tool

Thanks

Linked Keywords
I am trying to get a script that makes my predefined keyword converted to links and / or converted t

Displaying an image using echo command
I had done a query on my database, one of the fields being an image reference to a directory where a

disabling a button server-side then re-enabling client-side breaks button postback
I have a tabbed container and a button (not in the container) on a page. If the first tab is selecte

Create multiple (n) arrays
Hi there,

I have the following need:

I have 2 arrays (coming from a databases)

Call db table from any PHP file
Hi,

I want to be able to call a database table that will be setup in another file called init

help with multi-update
Now sure how to ask this really....
10g database if that matters.

I have a customer

how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s

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