[eluser]razerone[/eluser]
[quote author="CroNiX" date="1383411501"]You didn't post the view, which is where it would be displayed.
What is this doing? I don't see you doing anything with $success after you create it (you don't pass it anywhere or anything), but you try to read the session data here before you actually create the session data.
Code:
$success['flash'] = $this->session->flashdata('success');
$this->session->set_flashdata('success', 'Message Has Been Submitted Successfully');
All you really need here is to set the session data in the controller:
Code:
$this->session->set_flashdata('success', 'Message Has Been Submitted Successfully');
And then display it if it exists in the view:
Code:
$message = $this->session->flashdata('success');
<?php if ($message !== FALSE): ?>
<div class=“alert alert-success”><?php echo $message; ?></div>
<?php endif; ?>
[/quote]
Sorry for late reply I did work that out last night.
Controller
Code:
$data_success['message_success'] = '<div class="alert alert-success">Your Message Has Been Recived Will Get Back To You In 24/48 Hours</div>';
View
Code:
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<?php if (isset ($message_success)) : echo $message_success; endif; ?>
</div>
</div>
But people say. it is best to make a data variable for it would you know what I would need to do?
Also on another topic. when my validation kicks in the content that was entered correct goes ways and have to re enter it I only want to be able to re enter the validation errors if any comes up.