I'm writing a program that must ask user to type in numbers. After each entry, the program has to report the cumulative sum of the entries to date. The program should terminate when user enters 0.
The code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include
The problem is that if I enter 0, the program will say there's 0 input in total(correct).
If I type in 1 and the next number is 0, program will say there's 2 entries in total.
And if I type in 11 and 0, I get 3 entries in total.
But even more strange is that if you type 111 then 11 then 0 you get total of 7 entries.
No, the program must not show me the sum of all numbers entered, just how many entries you made, untill you typ in 0.
Drawing Images in classes
I'm quite new to Object Oriented PHP. What I'm trying to do is draw some images but also have other content on the page.Code: include('images.php');//New Image set$im=new images();//Sends headers and
Install page
How do I make it so when a user submits information on the Install page, it'll right it into the correct file. I can do the forms and $_POST, but I need it so that it actually works.Current stuff in
How to show a complete textarea ??
I enter Client Case Notes notes in a textarea field on a PHP form. The field is 5 rows deep and 70 chars wide , using the scroll bar to see beyond 5 lines.After entering notes, I want to echo or print
Why Are These Functions Causing MASSIVE Memory Problems? Please Help!
Hi,I have a script with some options.I use regex to replace patterns in strings, but I seem to be using them incorrectly, because they very quickly break my max_memory_limit (by several orders of
Php If in MySql query (hiding labels if a field is empty)
Okay, I've been trying to do this for a while, and I'm finally going to ask for help so I can get the simple answer and feel like an idoit .Anyway, I'm building a dynamic driver profile page for my
PHP Blog help
Need help with posting comments in a word press blog? I have a comments page where the comments are sent as email to me (I have the option of either posting it online or deleting it), instead I want
Supress some serveroutput but not all
Hi,
Problem in back link
I have page where i have given javascript back link but when i click on it browser give a messageWebpage has expired
Code doesn't print what i wanted it too. Please help!
Hi there,I wrote this code to mae it so that in the form before it that the user said their username and then on this page it matches up the username with the username on the database and then uses
preg_match logical error
Code: <?php$s = file_get_contents("page.html");preg_match('/<div class="brown_box main_ge_page vertically_spaced"><div