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 Link to comment https://forums.phpfreaks.com/topic/173769-php-form/ 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? Link to comment https://forums.phpfreaks.com/topic/173769-php-form/#findComment-916007 Share on other sites More sharing options...
Adam Posted September 10, 2009 Share Posted September 10, 2009 What's your question? Link to comment https://forums.phpfreaks.com/topic/173769-php-form/#findComment-916009 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 Link to comment https://forums.phpfreaks.com/topic/173769-php-form/#findComment-916010 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 Link to comment https://forums.phpfreaks.com/topic/173769-php-form/#findComment-916016 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 =] Link to comment https://forums.phpfreaks.com/topic/173769-php-form/#findComment-916020 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> Link to comment https://forums.phpfreaks.com/topic/173769-php-form/#findComment-916022 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 =] Link to comment https://forums.phpfreaks.com/topic/173769-php-form/#findComment-916031 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.