Im trying to pass a javascript value into PHP:
for(var i = 1; i <= 4; i++)
{
var randomRuta = Math.floor((Math.random() * 100) + 1);
$('.click#'+randomRuta).addClass('monster').html($('<img src="blackdot.png" title="<?= $row['i'] ?> Level <?= $row['i'] ?>">'));
}
In this case, I is an javascript Value.
Here is my PHP:
mysql_connect($host,$user,$password)
or die(mysql_error());
mysql_select_db($database)
or die(mysql_error());
$monster = mysql_query("SELECT * FROM monster");
I want to assign the javascript variable into the PHP variable. Is this possible without involving Ajax?