Use PHP or script in html web page?

I have a registration form on a web page for entering a bowling tournament and I want to have a dollar total at the bottom based on check boxes and not null text boxes. Should I use a PHP file or script in the html code to do this. Being a newbee at all of this, I am not sure which way to proceed. Once I know that, I am sure there are plenty of books here to work with. None of the information in the form is saved. Thank you

If you use a script php, you must also name the file .php.
Furthermore, if you want the form to be sent to an email account, you need php and if you would like to save the information in your site you also need a database(e.g. mySql).
I think you just want to send the form, so you have to add a script php with the function mail(). On the web you can find plenty of basic scripts that can fit to your form. You can send the data to another page or you can send data to the same page.

I wish I helped you. If you need details write here.

Not sure quite what you mean. Using PHP would be a script. Script simply means a bit of programming. You will need some programming for what you are proposing, you could use PHP or JavaScript.

For any kind of post submission form processing php is a good choice.

This sounds like something that will change on the page as the user interacts, without a refresh. For that use javascript.

I think of script as something that gets executed. If people show me a small set of examples from their work or even just one entire page of their work, I call that as a snippet.

I thought that PHP was a specific language that had to be in a specific file like test.php external from an html file and that Java script was scripting that can be used inside of an html file.
Yes I would like the page to update a textbox with the total as the user fills in the form. sounds like SamA74 has the right idea, so Javascript and I assume it would be right inside the html code file.
Thank you for all the responses.

Javascript would update the total on the form.
But you may then use PHP to process the form data when the user submits the form.

It can be separate from html, but it is commonly used to control and output html among other tasks.

Thank you SamA74. Now I will Have to find some books to help me achieve my goal.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.