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

[eluser]tjmthome[/eluser]
Hi, maybe you could give me some advise about best way to attack this problem :roll:

I have a view with data with info of users (tabular) name, address, phone etc. at the end of the row two links for 'edit' and 'delete'.
when the user press the link edit, i get the info from a DB and populate a form with the info from that user using an $user array like this:
<input name="name" type=text value="<?=$user['name']"?>/> and so on.
this forms action is pointing to welcome/doUpdate

In function welcome/doUpdate i do validate the data from the user, but the problem is that i dont know how to re-populate the form again if there is an validation error because $user array doesnt exists anymore.

Im sure you know a better way to solve this. I 've been searching in forums and i have no seen someone asking similar question.

Thanks in advance


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