Re: Question before I end up writing alot of extra code...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> The problem I'm running into though, is when a value has not changed it
> doesn't get $_POSTed back and my update script erases the info in the
> database... I'm trying to avoid using $_GET since it can be quite a few
> variables.
>
> Is there anyway I can do it without comparing the original field to what I
> am displaying?


I would assume that when you bring up your form to be edited you would query
your database to pull up the current information and then:

1 - echo those values out in your form fields

OR

2 - Put the values into hidden form fields

If you use #2 then when you do your update you can just check to see if any
form objects are left blank...if they are blank use your hidden values...if
they aren't blank use the form values.

f you use #1 then you just update using all the form values.

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux