kaiser0427
06-29-2010, 09:05 PM
can anyone foresee a problem with code (other than if JS is not enabled, which there is a script that won't allow the page to be seen if it is not enabled)
function addCost(){
document.getElementById('hidden').innerHTML = "<input type='hidden' name='my_hidden_input' value='<?php callFunction('add_ons','addon_cost', 'addonid', 3); ?>' />";
}
<label><input type="radio" name="design" onclick="showDiv('upload');addCost();" value="<? getCost('add_ons','addon_name', 'addonid', 3); ?>" /><?php getLabel('add_ons','addon_name','addonid', 3, 'addon_cost');?></label>
I'm using JS to write HTML that calls a php function so when a radio button is selected it pulls the price from one table in a database and stores it in a variable to post to another table at a later time.
It works fine and post to a database perfectly. I was just wondering if I am not thinking of a problem this may cause down the road. Any security issues I may be overlooking?
function addCost(){
document.getElementById('hidden').innerHTML = "<input type='hidden' name='my_hidden_input' value='<?php callFunction('add_ons','addon_cost', 'addonid', 3); ?>' />";
}
<label><input type="radio" name="design" onclick="showDiv('upload');addCost();" value="<? getCost('add_ons','addon_name', 'addonid', 3); ?>" /><?php getLabel('add_ons','addon_name','addonid', 3, 'addon_cost');?></label>
I'm using JS to write HTML that calls a php function so when a radio button is selected it pulls the price from one table in a database and stores it in a variable to post to another table at a later time.
It works fine and post to a database perfectly. I was just wondering if I am not thinking of a problem this may cause down the road. Any security issues I may be overlooking?