Welcome Guest, Not a member yet? Register   Sign In
Show name “corrupted” when validation fails
#2

I am not sure I understand the problem as the example you have given looks right.

However, set_value works like this:

You have
PHP Code:
set_value('name'$this->input->post('name'))   // **** Not correct use of second term 


When it should be just

PHP Code:
set_value('name''')
or
set_value('name'$default_value);
or
set_value('name''Your name'); 

The second term on the set_value should be your default, or nothing was submitted value, not the input post value. That is done with the first term, in your case 'name', so it looks for any post value with that post name and uses that, or if not found, uses the default term, the second term.

You can see it explained much better here: http://www.codeigniter.com/userguide3/he...#set_value

Hope that helps,

Paul
Reply


Messages In This Thread
RE: Show name “corrupted” when validation fails - by PaulD - 11-09-2015, 08:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB