Preloading values onto a form

I have developed a form for ordering a pizza and I am able to Post the form entries into a table and make all the calculations.

I would like to put the entry screen back up showing the total cost of the order.

I have tried to preload the form as below with the total price which is $totprpizzas but it just shows the actual text, not the price of say 20.50,

<input id="totprpizzas"  name="PricePizzas" size = "6" type="text" maxlength="6" value=($totprpizzas) />   <br />

How do I get the value rather than text to show in the entry field?

Mike Smith

Welcome, @doncaster319, I have formatted your code for you to make it easier for us to read. In particular, HTML code will not show up if you don’t format it. In the future, when you post code here you can format it yourself by placing three backticks(```) on the line before the code, and three backticks on the line after the code. Alternatively, you can highlight your pasted code and select the <> icon from the top of the edit area of your post.

For one, the value field is not properly formatted. Second, you need to use the Php output tags. HTML will not parse PHP. Third, use HTML5.

Thank you for explaining this to me.

Mike

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