public function student_email()
{
$opt=$this->uri->segment(3);
$class=$this->input->post('class');
$edu_level=$this->input->post('edu_level');
$data=$this->newsletter_model->get_StudentData($opt,$class,$edu_level);
$subject=$this->input->post('txtSubjectRequired');
$message=$this->input->post('txtMessageRequired');
$message=nl2br($message);
$note="student";//Variable for Identifying Students alone
//Test Email
$email=$this->input->post('txtEmail');
if(trim($email)!=''){
$note="test";
$name="User";
$data=$email;
$this->sendMail($data,$subject,$message,$note,$name);
}
else {
//$this->sendMail($data,$subject,$message,$note,$text,$name='');
}
if($this->session->userdata('mail_status')=="success"){
$this->session->set_flashdata('success', 'Mail sent Successfully.');
}
else{
$this->session->set_flashdata('success', 'OOPS.! Mail Sending failed..!.');
}
$this->session->unset_userdata('mail_status');
redirect('/newsletter/student/'.$opt , 'refresh');
/**Note:
* Filter by field of study and Last topic need to be coded..
*/
}
flash data
未被清除。答案 0 :(得分:0)
<?php
header("Expires: Thu, 19 Nov 1981 08:52:00 GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
?>
我找到了这段代码
它解决了这个问题..