View Single Post
Old 04-15-2007   #5 (permalink)
notjustgraphics
Rusty Bio-Hazard!
 
notjustgraphics's Avatar
 
Join Date: Sep 2006
Location: Toronto, Ontario, Canada
Posts: 1,163

Send a message via MSN to notjustgraphics
Hi liam.smith

I'll assume you're using some type of "SELECT" query to display the info in the edit form... you need to restrict the active record by using a WHERE condition:

PHP Code:
SELECT FROM table WHERE memberid '#####' 
Of course, table is the name of your table. memberid is the fieldname for your membership id's, and ##### is the specific id number for that user.

This way, the user will only see the data recorded for their account.

When the change the data, and I'll assume you are using a Java Submit function, you need to apply the same condition to your "UPDATE" query:

PHP Code:
UPDATE table SET field1 'value'field2 'value' WHERE memberid '#####' 
Again, table is the name of your table, memberid is the fieldname for your membership id's, and ##### is the specific id number for that user. field1 is the first information field you wish to update with the users new changes, field2 is the second, and so on.

I hope this helps.

Mike.
__________________
notjustgraphics is offline