Itattytwitwip
New Member
I'm trying to write a Python program that receives posted data from an HTML form and converts each item to a variable. For example, the HTML form itself:\[code\]FORM HEADER Select a rating, from highest to lowest priority # user can drag these around to list highest to lowest price speed materials terrain - check all that apply # html checkboxes [] Pavement - road bike, recreational bike, commuting bike [] Dirt or rocky trails - mountain bike [] Gravel roads - recreational bike, commuting bike, mountain bike\[/code\]When the user submits the form, I want somehow end up with the following variables in Python:\[code\]rating_price = 1 # this is the rating number, i.e. "1" is the one they put firstrating_speed = 3 # 3 is the one they put lastrating_materials = 2 # and 2 is in the middleterrain = ['Pavement', 'Gravel'] # this is a list that includes all 'checked' variables in terrain\[/code\]Any help would be much appreciated!