Welcome Guest, Not a member yet? Register   Sign In
repopulate form if source array doesnt exist
#2

[eluser]Santiago Dimattía[/eluser]
Why don't you query the user data again in welcome/doUpdate, and then you do this:
Code:
<input name="name" type="text" value="<?php echo set_value('name', $user['name']); ?>" />
So, if the form was sent, it will display $_POST vars. If it wasn't, it will show the default value (in this case, $user['xxx']).


Messages In This Thread
repopulate form if source array doesnt exist - by El Forum - 10-06-2010, 04:42 PM
repopulate form if source array doesnt exist - by El Forum - 10-06-2010, 06:50 PM
repopulate form if source array doesnt exist - by El Forum - 10-07-2010, 08:07 AM
repopulate form if source array doesnt exist - by El Forum - 10-07-2010, 08:37 AM
repopulate form if source array doesnt exist - by El Forum - 10-07-2010, 08:44 AM
repopulate form if source array doesnt exist - by El Forum - 10-07-2010, 09:34 AM
repopulate form if source array doesnt exist - by El Forum - 10-07-2010, 11:02 AM
repopulate form if source array doesnt exist - by El Forum - 10-12-2010, 09:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB