check against original and modified data

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bianster
Forum Newbie
Posts: 13
Joined: Sun Feb 08, 2004 3:47 am

check against original and modified data

Post by bianster »

I have a table named Vehicles(vehno, vehmodel, owner). I will have a form that allows the updating of a user's profile, this profile includes the user's vehicles. Im having trouble figuring out how to check the updated form's vehicle information against the database.

for example:
User modifies the current vehicle info, I need to remove the original vehicle from the Vehicles table. Is there a way to achive this while avoiding the use of session variables or global variables??
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

You could store the original information in hidden form variables, then pull that data from the POST vars. Or, if owner is your key and owner doesn't change, you could use an UPDATE query to just change the data other than the key.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply