google_forms/application/controllers/Form_controller.php

28 lines
593 B
PHP
Raw Normal View History

2024-07-10 12:37:36 +00:00
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Form_controller extends CI_Controller {
2024-07-16 12:29:59 +00:00
public function index_forms()
2024-07-10 12:37:36 +00:00
{
2024-07-16 12:29:59 +00:00
$this->load->view('Frontend/header');
$this->load->model('Frontend_model');
$data= $this->Frontend_model->getforms();
$this->load->view('Tables/list_forms',['forms'=> $data]);
$this->load->view('Frontend/footer');
2024-07-10 12:37:36 +00:00
}
2024-07-16 12:29:59 +00:00
public function delete($id)
{
$this->load->model('Frontend_model');
$this->Frontend_model->deleteForm($id);
$this->session->set_flashdata('status','Form data deleted successfully');
redirect('forms_home');
}
2024-07-10 12:37:36 +00:00
}