Welcome Guest, Not a member yet? Register   Sign In
set_value() with redirect() issue
#11

[eluser]gRoberts[/eluser]
From what I have seen, the OP wants to get around the "resubmit" dialog that appears when pressing refresh etc.

If you are insisting on pursuing this, you would need to change your code to something like the following:

Code:
<?
if ($this->form_validation->run() === true)
{
    redirect('good_job');
}
else
{
  $this->load->library('session');
  foreach($_POST as $Key => $Value)
  {
   $this->session->set_flashdata($Key, $Value);
  }
  redirect();
}
?>

Then within your view, I would add

Code:
<?
$CI =& get_instance();
$CI->load->library('session');
?>

or load the library via autoload or via the action displaying the view.

then do:

Code:
Username : <input type="text" name="text_username" value="<?php echo $this->session->flashdata('text_username'); ?>" />


Messages In This Thread
set_value() with redirect() issue - by El Forum - 05-14-2012, 05:40 AM
set_value() with redirect() issue - by El Forum - 05-14-2012, 05:45 AM
set_value() with redirect() issue - by El Forum - 05-14-2012, 05:47 AM
set_value() with redirect() issue - by El Forum - 05-14-2012, 05:51 AM
set_value() with redirect() issue - by El Forum - 05-14-2012, 06:30 AM
set_value() with redirect() issue - by El Forum - 05-14-2012, 06:31 AM
set_value() with redirect() issue - by El Forum - 05-14-2012, 06:34 AM
set_value() with redirect() issue - by El Forum - 05-14-2012, 07:19 AM
set_value() with redirect() issue - by El Forum - 05-14-2012, 08:20 AM
set_value() with redirect() issue - by El Forum - 05-14-2012, 08:41 AM
set_value() with redirect() issue - by El Forum - 05-14-2012, 08:42 AM
set_value() with redirect() issue - by El Forum - 05-14-2012, 08:50 AM
set_value() with redirect() issue - by El Forum - 05-14-2012, 09:16 AM
set_value() with redirect() issue - by El Forum - 05-14-2012, 09:19 AM
set_value() with redirect() issue - by El Forum - 02-08-2013, 12:47 PM
set_value() with redirect() issue - by El Forum - 02-08-2013, 01:29 PM
set_value() with redirect() issue - by El Forum - 02-08-2013, 02:41 PM
set_value() with redirect() issue - by El Forum - 02-08-2013, 05:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB