データベースから取得していくつかの値を取得しようとするphpタグがあります。次に、これらの値を変数に宣言し、それらの変数を使用して値を html body タグに渡します。
PHP:
<?php
$sql = "SELECT * FROM productItem;";
// Write a statement to open a connection to MySQL server
$link = mysql_connect("localhost:3306", "root", "6i7yvBku");
// Write a statement to select the required database
mysql_select_db("KXCLUSIVE", $link);
// Write a statement to send the SQL statement to the MySQL server for execution and retrieve the resultset
$resultset = mysql_query($sql);
// Write a statement to close the connection
mysql_close($link);
$year = $row["year"];
$month = $row["month"];
?>
HTML:
<body onload="countdown(year,month)">
php 変数 ($year と $month) を html body タグに入れるにはどうすればよいですか (body タグの年と月の変数を置き換えるには??