close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

math script

Thread began 1/05/2015 10:34 am by Jamie | Last modified 1/06/2015 4:49 am by Jamie | 369 views | 4 replies |

Jamie

math script

Hi Jason

Just some advice if I may please.

I have a client that is looking to be able to allow their visitors to make a few selections (dynamically driven from the db) which will be numbers and then have a script calculate those values to create a total.

I have been hunting for a tut online but cant find one and am thinking that my search terms may not be quite right as am not 100% sure what I should be looking for so just wondering if you might know of a script / tut that you could point me in the direction of?

Many thanks

Jamie

Sign in to reply to this post

Jason ByrnesWebAssist

theres not really a script that will do this for you, you need to write the code to do the math on the returned values.

for example, if the values are coming from a recordset:

<?php echo("The Total Is: ".($row_RecordsetName['column1'] + $row_RecordsetName['column2']).""); ?>

Sign in to reply to this post

Jamie

oh right so where should i start if elements are variable depending on the option selected?

Sign in to reply to this post

Jason ByrnesWebAssist

when the form submits, you could do math on the posted values:

<?php echo("The Total Is: ".($_POST['element1'] + $_POST['element2']).""); ?>

Sign in to reply to this post

Jamie

Thanks Jason

I will give that a shot

Cheers

Jamie

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...