co.ador Posted February 10, 2010 Share Posted February 10, 2010 I have this database field that used as the form input value '. $variety['price']. ' I also have a '. $variety['size']. ' database field that carry the name of the product but I don't know what another form input property to use to assign this size database field as a value to the input form property? I feel like I have run out of properties to carry more values to other values beside price to cart.php. Thank you the script is as below. <form action="cart.php" method="post"> foreach($product['varieties'] as $variety){ echo'<input style="width:10px; margin-left:9px; " name="price[]" type="checkbox" value="' . $variety['price']. '" />'; } </form> Link to comment https://forums.phpfreaks.com/topic/191649-what-property-inside-the-form-can-i-use-to-assign-this-index-string-%E2%80%98size%E2%80%99/ Share on other sites More sharing options...
jl5501 Posted February 10, 2010 Share Posted February 10, 2010 As sizes will be a restricted and know set of values, why not use an array of radio buttons, or a dropdown select list? Link to comment https://forums.phpfreaks.com/topic/191649-what-property-inside-the-form-can-i-use-to-assign-this-index-string-%E2%80%98size%E2%80%99/#findComment-1010216 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.