•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,592 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,529 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 494 | Replies: 3
![]() |
Hey, not sure if this is possible with PHP, but I thought I'd ask anyway. Is it possible to update values on an html page based on values being typed into an input box? For example. My table has three columns. Column 1 has an integer in it. Column two is a blank text input box. I would like column three to dynamically show the total of column 1 plus column 2. So whatever number you put in the box in column 2 would be automatically added to the number in column one, and show the total in column 3, without hitting a button or anything. Is this possible with html and php? If not, what would be the language best suited to accomplish this?
Thanks,
Nate
EDIT: Again, I search and search and search, and not until I post a question on the forum, do I find the answer. If you know of a way to do it with PHP, great, please share, but I thought I would share an example I found that will work great, using Javascript. See the example I found here. Just view the source to see the easy way they did it.
Thanks,
Nate
EDIT: Again, I search and search and search, and not until I post a question on the forum, do I find the answer. If you know of a way to do it with PHP, great, please share, but I thought I would share an example I found that will work great, using Javascript. See the example I found here. Just view the source to see the easy way they did it.
Last edited by nathanpacker : Nov 3rd, 2007 at 9:58 pm.
Just by using php and html it wouldn't be possible. However it would be possible using ajax and making calls back to the php script to get data. I'm not sure exactly how it works but thats the only way I can think of unless you use javascript like in your example.
Always do what you wish you could..
•
•
Join Date: Aug 2007
Location: Cavite,Philippines
Posts: 508
Reputation:
Rep Power: 3
Solved Threads: 68
javascript is the simplest and easiest way.However,if you want to harden yourself,use AJAX.
"death is the cure of all diseases..."
http://ryantetek.wordpress.com
http://ryantetek.wordpress.com
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Send data on a serial port (C++)
- PHP Dynamic Form HELP! (PHP)
- Default Values of Text Field (JavaScript / DHTML / AJAX)
- submiting info into a database for retrieval! (PHP)
- passing values from a form to a dialog form (VB.NET)
- Dynamically Update Your Web Pages Via E-Mail (Search Engine Optimization)
- Save the values of a form (HTML and CSS)
- Registration form help (ColdFusion)
- php wont submit data into the database (PHP)
Other Threads in the PHP Forum
- Previous Thread: PHP MSSQL APACHE problem in coonecting to database
- Next Thread: Update multiple rows from loop?


Linear Mode