Hi
I have a form with 6 textfields that will be used to edit data in the database.
When a value is entered in one of the text field I want that value to be only updated in the database.
Ex.
[]id
[]name
[]age
[]address
[]number
[]gender
if name was edited, only the name field would be updated in the database.
As of now heres the code of what Im currently thinking
if($name)
{
UPDATE customer
SET name=value
WHERE id=id
}
elseif ($age)
{
UPDATE age
SET age = age
WHERE id = id
}
....and so on
Is there an easier way to do this? Or am I stuck with these codes?