PHP Classes

File: api/request/student.php

Recommend this page to a friend!
  Classes of Boss Ibrahim Mussa   PHP School Management System with Student Payroll   api/request/student.php   Download  
File: api/request/student.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP School Management System with Student Payroll
Manage payments from school students
Author: By
Last change:
Date: 2 years ago
Size: 1,650 bytes
 

Contents

Class file image Download
<?php
header
("Access-Control-Allow-Origin: *");
// header("Content-Type: application/json; charset=UTF-8");

include '../config/connection.php';
include_once
'../class/student.php';

$id=NULL;
$fname=NULL;
$lname=NULL;
$sex=NULL;
$phone=NULL;
$email=NULL;
$depart=NULL;


if(isset(
$_POST['student'])){
    switch(
$_POST['student']){
        case
'addstudent':
           
$fname=$_POST['fname'];
           
$lname=$_POST['lname'];;
           
$sex=$_POST['sexe'];;
           
$phone=$_POST['phone'];;
           
$email=$_POST['email'];;
           
$depart=$_POST['departement'];
           
$user = new student($connexion,$id,$fname,$lname,$sex,$email,$phone);
           
$user->insertStudent();
        break;
        case
'studentPay':
           
$iduser=$_POST['idstudent'];
           
$user = new student($connexion,$iduser,$fname,$lname,$sex,$email,$phone);
           
$user->studentPay($_POST['bkproof'],$_POST['stdAmount'],$_POST['idTypefess'],$_POST['iduser']);
        break;
       
    }
   
}
if(isset(
$_GET['student'])){
    switch(
$_GET['student']){
        case
'getStudents':
       
$user = new student($connexion,$id,$fname,$lname,$sex,$email,$phone);
       
$user->displayStudents();
        break;
        case
'getStudentInfos':
       
$id=$_GET['rollnumber'];
       
$user = new student($connexion,$id,$fname,$lname,$sex,$email,$phone);
       
$user->detailStudent();
        break;
        case
'getTransactions':
       
$id=$_GET['userid'];
       
$user = new student($connexion,$id,$fname,$lname,$sex,$email,$phone);
       
$user->studentTransaction();
        break;
    }
}