Passing parameters to PHP via a link like

Greetings! Such a task, there is a php site and an html site. You need to add code like this on the html site

<script type="text/javascript">
var a = 1;
var b = 2;
var c = 3;
<script type="text/javascript" src=""></script>

script.js – receives variables, receives data from the database based on them and returns js code

For example: google adsense.

The question is how to get the variables a, b, c in script.js?

Answer 1, authority 100%

the easiest way, without editing server configs.

<script type="text/javascript" src=""></script>

change to:

<script type="text/javascript" src=""></script>

where var1,2 is the name of the variables and val1,2 is their value, respectively

if you mean dynamic loading of scripts, then the easiest way is to use jQuery:

<script type="text/javascript">
            $("head").append("<script type=\"text/javascript\" src=\"\"><\/script>");

Answer 2, authority 50%

easy to do
<script type="text/javascript" src="https:///script.php?"></script>
and based on the data generate javascript from php

additive. enter recall then by the name of script.js in the .htaccess file, passing parameters to the php script [L]