I have a Controller in Codeigniter like following :
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Charity extends MY_Controller {
public function index()
{
if($this->input->method() === 'post'){
$data['name'] = $this->input->post('name');
$this->load->view('review_page', $data);
}else{
$this->load->view('charity');
}
}
}
the views are :
charity.php
<form method="post" action="/">
<input name="name" type="text"/>
<input value="send" type="submit"/>
</form>
review_page.php
<h1><?= echo $name; ?></h1>
When I submit the form I get the review_page view loaded but if I click on the browser's back button I come back to the form. Is there a why to make the form page expired after it is submitted so that the back button does not show it?
Thanks