I need to get data from the database, I use PHP code to do that, but when I need to set an array value in this part new_article_query->execute( array(article, manufacturer) );
how can I use javascript value if article
and manufacturer
are defined in javascript
<script>
//Javascript function code part 1...
//Then I insert PHP code in the javascript function
<?php
$new_article_query = $db_link->prepare('SELECT * FROM `shop_prices_data` WHERE `article` = ? AND `manufacturer` = ?;');
$new_article_query->execute( array(article, manufacturer) );
$new_article = $new_article_query->fetch();
$reg_invoice_value = $new_article["$new_article"];
?>
//Then javascript function continue
return start_wrap_div + '<td class="td_manufacturer">'+ manufacturer + show_hide_button +'</td><td class="td_article">'+ article_show +'</td><td class="td_name">'+ name +'</td><td class="td_exist">'+ exist +'</td><td class="td_time_to_exe"><span onclick="openInfoWindow(null, null, 1, \''+ supply_info_json +'\');">'+ time_to_exe +'</span></td><td class="td_info">'+ info +'</td><td class="td_price">'+ price +'</td><td class="td_add_to_cart">'+ cart_html +'</td>'+ '<td class="td_color" style="background:'+color+'"></td>' + end_wrap_div;
}
</script>