Absolute beginner hoping for guidance


#1

Hi - I’m reasonably familiar with HTML and run my own website but I need a little more functionality and (I hope) php might be the way to do it, although I have never used it before.

I basically have a form on my site (http://silverphotography.co.uk/reprints … erform.htm)
and want to display a total cost based on user selections. There are only two form elements that can be selected that will affect the total. So a simple breakdown would be: if X is selected from menu 1 and Y is selected from menu 2 display X+Y in a third text box (either on the same page or a new page once the form has been submitted)

My questions are - is php the right way to go? Where do I start looking for a tutorial on this (what might these functions be referred to on the web)?

Many thanks, Trevor


#2

If you want it displayed on the same page (without page refresh) you’ll have to use Javascript.

After a page refresh, you can use any form-submitted data in PHP. A decent tutorial (on a website you should bookmark) is http://www.php.net/manual/en/tutorial.forms.php

Check out the tutorial section and I’m pretty sure you should be able to come up with something that works :slight_smile: (and if it still doesn’t, post it here and we’ll try 'n help you out).