Пример #1
0
 function add()
 {
     include "faculty.php";
     $obj = new Faculty();
     $id = $_REQUEST['id'];
     $name = $_REQUEST['name'];
     if (!$obj->addFacultyDetail($id, $name)) {
         return false;
     } else {
         return true;
     }
 }
Пример #2
0
<?php

include "faculty.php";
$obj = new Faculty();
if (isset($_GET['fid'])) {
    $id = $_GET['fid'];
    $name = $_GET['fna'];
    if (!$obj->addFacultyDetail($id, $name)) {
        echo "Error in Adding faculty " . mysql_error();
    } else {
        echo "Successful in adding {$name}";
        //header('location:faculView.php');
    }
}