i have a js function which is called in onchnge event of dropdown list function get_values() { alert('enter function'); var pcode=document.getElementById('p_code').value; var b = "<?=get_value_php();?>"; alert(b); } i want to pas pcode variable to get_value_php function which is in php and i want to do it before the form is submit.plz do reply me soon if anybody had any idea of it
The <?= get_value_php(); ?> is shortform for <?php echo get_value_php(); ?> and perfectly valid - although I don't know why you'd want to echo a function, but that's a whole different matter.