[eluser]lordoffriends[/eluser]
Ok here is the scenario.I am populating the dropdown from Database.When ever the form is submitted,i need to do two things
1) persist the value selected in dropdown.
2) using session->set_flashdata(),i need to set the custom database message.
Now as we know,we need to redirect before this flash data can be set.
This is the code which i have written.
if ($this->form_validation->run() == TRUE){
$this->session->set_flashdata('msg', 'Taha Hasan');
redirect(current_url());
$this->ShowReceiveInventoryView();
}
Also i m using set_select in the dropdown view to persist the value.
<select name="myselect">
<option value="one" <?php echo set_select('myselect', 'one', TRUE); ?> >One</option>
<option value="two" <?php echo set_select('myselect', 'two'); ?> >Two</option>
<option value="three" <?php echo set_select('myselect', 'three'); ?> >Three</option>
</select>
Now here is the problem...The flash message appears BUT because i am redirecting to the current page,the drop down set_select value is lost !!! Default value appears in the selection

..If i remove the redirect line,the dropdown value is presisted but Flash data is not set !!!
Hope you guys have a solution to this problem...