使用默认值计算表单值的PHP脚本可能使用提交时的if和else语句。 to page2.php

更新j_s_stack我已经在这里添加了大部分代码供您查看脚本所做的计算,正如您从评论选项卡中所知,我对php脚本和论坛脚本进行了一些更改,相应地更改了id,

Terraced Semi-Detached Detached Bungalow Flat/Apartment Other
Select value £0 - £100,000 £100,001 - £200,000 £200,001 - £300,000 £300,001 - £400,000 £400,001 - £500,000 £500,001 - £600,000 £600,001 - £700,000 £700,001 - £800,000 £800,001 - £900,000 £900,001 - £1,000,000 £1,000,001 - £2,000,000 £2,000,001 - £5,000,000 £5,000,001 and above
I'm Not Sure 1 Bedroom 2 Bedrooms 3 Bedrooms 4 Bedrooms 5 Bedrooms 6 Bedrooms 7 Bedrooms 8 Bedrooms +
I'm Not Sure RICS Condition Survey RICS Homebuyer Survey RICS Building Survey

PHP脚本

   

示例选择应显示的值时的值:

  Terraced £0 - £100,000 1 Bedroom RICS Condition Survey 

总计应该是:你的报价:125(正确)

当我选择“不确定”作为我的调查类型时,答案是:

 condition Quote: 65 homebuyer Quote: 235 building Quote: 260 valuation Quote: 160 

<<<>>>>>

    

Assisted Sale

  • .... Text about Surveys......
  • .... Text about Surveys......
  • .... Text about Surveys......
  • .... Text about Surveys......
Your Condition Survey Quote is:
<input type="text" name="pricetxt" class="price_txt" readonly value=""/>

Please Confirm Contact Number:

我已经添加了每个框的代码,其中列出了调查报告的报价,正如您在价值中看到的那样,我有以前的“”,所以我想我可以尝试使用h1-h5标签,看看最适合的是什么?

谢谢。

我会把所有的caluclation东西放在一个函数中。 然后创建另一个IF条件以查看用户选择的内容:

  

我没有再测试过,所以他们可能会犯一些错误。