webber09 Posted September 10, 2009 Share Posted September 10, 2009 Hi everyone, I'm not sure if this is the right place to ask, but its worth a try. I am wanting to make a form to allow users to get a quote on a certain product, depending on what they put into the form (from pre-made options) depends on the price they are quoted. thanks in advanced to anyone who can help Quote Link to comment Share on other sites More sharing options...
phpretard Posted September 10, 2009 Share Posted September 10, 2009 What kind of math? adding? subtracting? multpying? division? Quote Link to comment Share on other sites More sharing options...
Adam Posted September 10, 2009 Share Posted September 10, 2009 What's your question? Quote Link to comment Share on other sites More sharing options...
webber09 Posted September 10, 2009 Author Share Posted September 10, 2009 i guess i will have to put an amount onto each option and it adds it up based on thos, so addition i guess Quote Link to comment Share on other sites More sharing options...
phpretard Posted September 10, 2009 Share Posted September 10, 2009 I guess you should make the form first Quote Link to comment Share on other sites More sharing options...
webber09 Posted September 10, 2009 Author Share Posted September 10, 2009 I guess you should make the form first ok, ill make it now and post the form coding in here later. thanks =] Quote Link to comment Share on other sites More sharing options...
phpretard Posted September 10, 2009 Share Posted September 10, 2009 <? if (isset($_POST['submit'])){ $sum=$_POST['addend1'] + $_POST['addend1']; } ?> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Math</title> </head> <body> <form action="" method="post"> <table border="0" width="100%"> <tr> <td width="72">Addend</td> <td><input type="text" name="addend1" value="<? echo $_POST['addend1']; ?>" size="6" /></td> </tr> <tr> <td>Addend</td> <td><input type="text" name="addend2" value="<? echo $_POST['addend1']; ?>" size="6" /></td> </tr> <tr> <td>Sum</td> <td><input type="text" name="sum" value="<? echo $sum; ?>" size="6" /> <input type="submit" name="submit" value="Answer" /> </td> </tr> </table> </form> </body> </html> Quote Link to comment Share on other sites More sharing options...
webber09 Posted September 10, 2009 Author Share Posted September 10, 2009 this is a very quick example of the kind of content I will have. <form> Required bit rate <select> <option>128kbps</option> <option>192kbps</option> <option>240kbps</option> <option>320kbps</option> </select><br /> Required listener ammount <select> <option>up to 100</option> <option>up to 200</option> <option>up to 400</option> <option>400+</option> </select><br /> Auto DJ? <select> <option>Yes</option> <option>No</option> </select> </form> what i need is from the form to detect the value selected in the <option> and depending on which are selected, add a set amount of money for each <option> and give a final total at the end =] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.