Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
HTML Form/PHP Script
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="JSEB" data-source="post: 473254" data-attributes="member: 92333"><p>I am trying to write one PHP script for 3 different HTML forms that validate the input on the form, and can calculate the total for each individual form. Create an overall total between the three forms, and print/show the individual and overall totals. If that makes any sense..</p><p></p><p>3 different forms are Shirt, Pants, and Shoes.</p><p>[URL unfurl="true"]https://gyazo.com/413bf42f7cb8ebe259756fd2052324b7[/URL]</p><p></p><p>[CODE]<!DOCTYPE html></p><p><html></p><p><head></p><p> <meta charset='utf-8'></p><p> <meta http-equiv='X-UA-Compatible' content='IE=edge'></p><p> <title>Voyage Clothing - Index</title></p><p> <meta name='viewport' content='width=device-width, initial-scale=1'></p><p> <link rel='stylesheet' type='text/css' media='screen' href='main.css'></p><p> <style></p><p> @import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap');</p><p> * {</p><p> font-family: 'Bebas Neue', cursive;</p><p> -webkit-text-stroke: 0.0001em black;</p><p> }</p><p> h1 {</p><p> text-align: center;</p><p> font-size: 40px;</p><p> color: #66FCF1;</p><p> }</p><p> h2 {</p><p> text-align: center;</p><p> font-size: 30px;</p><p> color: #45A29E;</p><p> }</p><p> p {</p><p> text-align: center;</p><p> font-size: 16px;</p><p> color: black;</p><p> }</p><p> img {</p><p> display: block;</p><p> margin-left: auto;</p><p> margin-right: auto;</p><p> width: 15%;</p><p> }</p><p> img:hover {</p><p> opacity: 0.5;</p><p> }</p><p> body {</p><p> background-color: white;</p><p> }</p><p> form { </p><p> margin: 0 auto; </p><p> width:250px;</p><p> }</p><p> </style></p><p></head></p><p><body></p><p> <h1> Voyage Clothing </h1></p><p> <section class="shirts"></p><p> <h2> Shirts </h2></p><p> <img src="/img/shirt.png" alt="voyage-shirt"></p><p><form></p><p> <label>Number of Shirts: <input type="number"></label></p><p></form></p><p><p> Total for shirts: </p></p><p> </section></p><p> <section class="pants"></p><p> <h2> Pants </h2></p><p> <img src="/img/jeans.jpg" alt="jeans"></p><p> <form></p><p> <label>Number of Pants: <input type="number"></label></p><p></form> </p><p> <p> Total for your pants: </p></p><p> </section></p><p> <section class="shoes"></p><p> <h2> Shoes </h2></p><p> <img src="/img/shoes.png" alt="shoes"></p><p> <form></p><p> <label>Number of Shoes: <input type="number"></label></p><p></form></p><p> <p> Total for your shoes: </p></p><p> </section></p><p></p><p></p><p></p><p></body></p><p></html></p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="JSEB, post: 473254, member: 92333"] I am trying to write one PHP script for 3 different HTML forms that validate the input on the form, and can calculate the total for each individual form. Create an overall total between the three forms, and print/show the individual and overall totals. If that makes any sense.. 3 different forms are Shirt, Pants, and Shoes. [URL unfurl="true"]https://gyazo.com/413bf42f7cb8ebe259756fd2052324b7[/URL] [CODE]<!DOCTYPE html> <html> <head> <meta charset='utf-8'> <meta http-equiv='X-UA-Compatible' content='IE=edge'> <title>Voyage Clothing - Index</title> <meta name='viewport' content='width=device-width, initial-scale=1'> <link rel='stylesheet' type='text/css' media='screen' href='main.css'> <style> @import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&display=swap'); * { font-family: 'Bebas Neue', cursive; -webkit-text-stroke: 0.0001em black; } h1 { text-align: center; font-size: 40px; color: #66FCF1; } h2 { text-align: center; font-size: 30px; color: #45A29E; } p { text-align: center; font-size: 16px; color: black; } img { display: block; margin-left: auto; margin-right: auto; width: 15%; } img:hover { opacity: 0.5; } body { background-color: white; } form { margin: 0 auto; width:250px; } </style> </head> <body> <h1> Voyage Clothing </h1> <section class="shirts"> <h2> Shirts </h2> <img src="/img/shirt.png" alt="voyage-shirt"> <form> <label>Number of Shirts: <input type="number"></label> </form> <p> Total for shirts: </p> </section> <section class="pants"> <h2> Pants </h2> <img src="/img/jeans.jpg" alt="jeans"> <form> <label>Number of Pants: <input type="number"></label> </form> <p> Total for your pants: </p> </section> <section class="shoes"> <h2> Shoes </h2> <img src="/img/shoes.png" alt="shoes"> <form> <label>Number of Shoes: <input type="number"></label> </form> <p> Total for your shoes: </p> </section> </body> </html> [/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
HTML Form/PHP Script
Top