Пример #1
0
<?php

session_start();
include '../class/config.php';
include '../class/class_subjects.php';
$subject = new Subjects();
$id = $_GET['id'];
$subject->subjectData($id);
$subject->courseListName($subject->course_id);
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $subject_id = mysql_escape_string($_POST['subject_id']);
    $name = mysql_escape_string($_POST['name']);
    $code = mysql_escape_string($_POST['code']);
    $unit = mysql_escape_string($_POST['unit']);
    $course_id = mysql_escape_string($_POST['course_id']);
    $subject->subject_id = $subject_id;
    $subject->name = $name;
    $subject->code = $code;
    $subject->unit = $unit;
    $subject->course_id = $course_id;
    $subject->subjectEdit($subject->subject_id);
}
?>

<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">