1
//replace the following with your details. Dbname is your username by default.
$con = mysqli_connect("info20003db.eng.unimelb.edu.au","geehwank","2058","geehwank");
// Check connection
if (mysqli_connect_errno()) {
echo "Could not connect to MySQL for the following reason: " . mysqli_connect_error();
}
/* this lists the name and release date of all action movies */
echo "<table border='1'>";
$result = mysqli_query($con,"SELECT name, release_date FROM Movie WHERE genre = 'action'");
while($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['name'] . "</td><td>" . $row['release_date'] . "</td>";
echo "</tr>";
}
mysqli_close($con);
此代碼是從我的UNI 並在表從MySQL 讀取並顯示在一個表中PHP MySQL表的創建需要在標題
IM一個PHP小白 我一直加試圖將名稱添加到名爲 的名單,釋放
我該如何在代碼中執行此操作?
任何人都可以幫忙?
你說你一直在努力。你有什麼嘗試?結果是什麼?請告訴我們。 – Kuya