當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Student::set_email方法代碼示例

本文整理匯總了PHP中Student::set_email方法的典型用法代碼示例。如果您正苦於以下問題:PHP Student::set_email方法的具體用法?PHP Student::set_email怎麽用?PHP Student::set_email使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Student的用法示例。


在下文中一共展示了Student::set_email方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _map_posted_data

 private function _map_posted_data()
 {
     $student = new Student();
     $student->set_first_name($_POST['first_name']);
     $student->set_last_name($_POST['last_name']);
     $student->set_dob($_POST['dob']);
     $student->set_blood_group($_POST['blood_group']);
     $student->set_email($_POST['email']);
     $student->set_contact($_POST['contact']);
     $student->set_program_id($_POST['program_id']);
     return $student;
 }
開發者ID:shrsujan,項目名稱:leapfrog,代碼行數:12,代碼來源:AdminStudentController.php

示例2: get_all

 public function get_all()
 {
     $student_list = array();
     $this->db->connect();
     $sql = "SELECT * from tbl_student";
     $result = $this->db->fetchQuery($sql);
     if ($result->num_rows > 0) {
         while ($row = $result->fetch_assoc()) {
             $student = new Student();
             $student->set_id($row['id']);
             $student->set_first_name($row['first_name']);
             $student->set_last_name($row['last_name']);
             $student->set_dob($row['dob']);
             $student->set_blood_group($row['blood_group']);
             $student->set_email($row['email']);
             $student->set_contact($row['contact']);
             $student->set_program_id($row['program_id']);
             array_push($student_list, $student);
         }
     }
     $this->db->close();
     return $student_list;
 }
開發者ID:shrsujan,項目名稱:leapfrog,代碼行數:23,代碼來源:student_repository.class.php

示例3: get_by_id

 public function get_by_id($id)
 {
     $student = null;
     $this->db->connect();
     $sql = "SELECT id,first_name,last_name,dob,blood_group,email,contact,program_id from tbl_student WHERE id=?";
     $stmt = $this->db->initStatement($sql);
     $stmt->bind_param("i", $id);
     $stmt->execute();
     $stmt->bind_result($id, $first_name, $last_name, $dob, $blood_group, $email, $contact, $program_id);
     while ($stmt->fetch()) {
         $student = new Student();
         $student->set_id($id);
         $student->set_first_name($first_name);
         $student->set_last_name($last_name);
         $student->set_dob($dob);
         $student->set_blood_group($blood_group);
         $student->set_email($email);
         $student->set_contact($contact);
         $student->set_program_id($program_id);
     }
     $this->db->close();
     return $student;
 }
開發者ID:shrsujan,項目名稱:leapfrog,代碼行數:23,代碼來源:student_repository.class.php

示例4: header

<?php

include_once '../config.php';
include_once ROOT_PATH . 'system/models/student.class.php';
include_once ROOT_PATH . 'system/repository/student_repository.class.php';
include_once 'header.php';
if (!isset($_POST['submit'])) {
    header('location:student.php?error=nopage');
}
$student = new Student();
$student->set_first_name($_POST['first_name']);
$student->set_last_name($_POST['last_name']);
$student->set_dob($_POST['dob']);
$student->set_blood_group($_POST['blood_group']);
$student->set_email($_POST['email']);
$student->set_contact($_POST['contact']);
$student->set_program_id($_POST['program_id']);
$student_repository = new StudentRepository();
$result_add = 0;
$result_edit = 0;
if (!isset($_POST['id']) || $_POST['id'] == '') {
    $result_add = $student_repository->insert($student);
} else {
    $student->set_id($_POST['id']);
    $result_edit = $student_repository->update($student);
}
if ($result_add > 0) {
    header('location:student.php?success=true');
} elseif ($result_edit > 0) {
    header('location:student.php?update=true');
} elseif ($result_edit == 0) {
開發者ID:shrsujan,項目名稱:leapfrog,代碼行數:31,代碼來源:save.php


注:本文中的Student::set_email方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。