It is a good way to solve it but since I don't want/can't use cookies in my application I could use only the random
keybut it would have to be unique or the where key=$key could refer to multiple lines or I would have to ask for the
userto input both the random and the serial number wich wouldn't be very good either. That's the reason I've being
tryingto make a random key wich would be unique so I could ask for the user to type his order code and then select
infofrom orders where ordercode=$ordercode and not have the risk of getting multiple answers (more then one line with
thatordercode) or someone typing his ordercode-1 and accessing someone elses form.
Do you have users logging in so that you know who is requesting the
data? If so, just make a view that includes WHERE name = current_user
to filter out all irrelevant (i.e., other people's) rows (inserts
should set name to the appropriate user, of course). In that case a
SERIAL will work fine, since there is no chance of seeing anyone
else's information and the SERIAL is unique. More secure, also.
Cheers,
Brook