Chacho Posted May 30, 2009 Share Posted May 30, 2009 I am just starting to learn php. I have a file that I'm training on and would like to add some math? The file is two forms the first a drop down and the second radio options. I would like to multiply the selected amount in the drop down with different amounts in the radio options. As I said I am a newb and not sure how to ask the question that I'm asking, please bare with me. Link to comment https://forums.phpfreaks.com/topic/160224-im-a-newb-help/ Share on other sites More sharing options...
Ken2k7 Posted May 30, 2009 Share Posted May 30, 2009 You would want to store the values in sessions so you can sum them up later. Read up on sessions. If you have some code, I can help you more. Link to comment https://forums.phpfreaks.com/topic/160224-im-a-newb-help/#findComment-845441 Share on other sites More sharing options...
Chacho Posted May 30, 2009 Author Share Posted May 30, 2009 From what I read so far I think I will need to set the information in a database. Link to comment https://forums.phpfreaks.com/topic/160224-im-a-newb-help/#findComment-845447 Share on other sites More sharing options...
Ken2k7 Posted May 30, 2009 Share Posted May 30, 2009 Well if you want to store the option and drop down values in the DB, then yes. Just to sum up two numbers, no. Link to comment https://forums.phpfreaks.com/topic/160224-im-a-newb-help/#findComment-845455 Share on other sites More sharing options...
Chacho Posted May 30, 2009 Author Share Posted May 30, 2009 ok I got some other help and learned how to work the if multiply thingys. I get good results for every combination entered in the form. Now I need an error message is the radio options are not clicked? Whats confusing me (not sure how to say this) the if statements for the radios all have values? I dont understand what I would do if no radio is picked? Link to comment https://forums.phpfreaks.com/topic/160224-im-a-newb-help/#findComment-845563 Share on other sites More sharing options...
DarkSuperHero Posted May 30, 2009 Share Posted May 30, 2009 the radio would have no value, but the key is still set for the request..... so you would have $_REQUEST['radioButtonGroup'] = ""; //You probably have a $_POST or $_GET Link to comment https://forums.phpfreaks.com/topic/160224-im-a-newb-help/#findComment-845583 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.