Hey there,
I'm having a bit of a problem trying to figure out a way to take a javascript function, pass the variable and display a PHP query result through the function. code is below....
function cardtype(type){
//CHANGE TABLE DYNAMICALLY
document.step1.product.value = "<?php echo mysql_result($prod,0,"productname"); ?>";
//END CHANGE TABLE DYNAMICALLY
}
What I am trying to do, is take the "type" variable in function cardtype, and insert it into the record id number in the mysql_result to return that specific record, i.e....
mysql_result($prod,type,"productname")
Is this possible? The query has been set to return all records under the products table, it's just a matter of displaying the specific record based on the passed variable.
Thanks in advance for your help!