⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editmodule.php

📁 自制国外大学学校计算机学院网站
💻 PHP
字号:
<?php
	include("database_access.php");
	$module_name = $_GET['q'];

	$query = "SELECT * FROM module_info WHERE module_name='".$module_name."'";
	$result = mysql_query($query) or die("Could not execute query.");
	$num_row = mysql_num_rows($result);
	echo "<b>The selected module information are shown below:</b><br /><br />";
	echo "<form name = \"edit_module\" method=\"GET\"><table border='1'>";
	for($i=0;$i<$num_row;$i++){
		$row = mysql_fetch_array($result);
		echo "<table name=\"".$unique_code."\" border='5'>";
		echo "<tr><td><b>Unique Code:</b></td><td><input type=\"text\" id=\"unique_code".$i."\" readonly = true size=\"40\" value=\"".$row['unique_code']."\"></td></tr>";
		echo "<tr><td><b>Module Code:</b></td><td><input type=\"text\" id=\"module_code".$i."\" size=\"40\" value=\"".$row['module_code']."\"></td></tr>";
		echo "<tr><td><b>Module Name:</b></td><td><input type=\"text\" id=\"module_name".$i."\" size=\"40\" value=\"".$row['module_name']."\"></td></tr>";
		echo "<tr><td><b>Lecturer:</b></td><td><input type=\"text\" id=\"lecturer".$i."\" size=\"40\" value=\"".$row['lecturer']."\"></td></tr>";
		echo "<tr><td><b>Year:</b></td><td><input type=\"text\" id=\"year".$i."\" size=\"40\" value=\"".$row['year']."\"></td></tr>";
		echo "<tr><td><b>Semester:</b></td><td><input type=\"text\" id=\"semester".$i."\" size=\"40\" value=\"".$row['semester']."\"></td></tr>";
		echo "<tr><td><b>Credits:</b></td><td><input type=\"text\" id=\"credits".$i."\" size=\"40\" value=\"".$row['credits']."\"></td></tr>";
		echo "<tr><td><b>Description:</b></td><td><textarea id=\"description".$i."\" rows=\"10\" cols=\"40\">".$row['description']."</textarea></td></tr>";
		echo "</table>";
		echo "<input type =\"submit\" onclick=\"requested_info('".$i."')\" value=\"Save\"><br /><br />";
	}
	echo "</form>";
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -