NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Form update mode


Joined: 24 Apr 2006
Posts: 11
Reply with quote
I have made a form with the database wizard.

In the script the wizard made it says the following:

// The default mode of this script allows a user to add a new record
// to table 'addressbook' in database 'buddyand_address'.
// To have this form function in update mode, the script needs to be
// called with a parameter for 'id' (key record field).

My question. Whats the best way to go as far as allowing a user to update thier own record?
View user's profileFind all posts by cjacksSend private message
Veteran

Joined: 24 Jan 2006
Posts: 311
Reply with quote
Hi there - sorry it took a while to reply. I am not quite sure I understand the question - are you asking how to call the script generated by the wizzard such that it would do update? Or is your question about security and allowing different users to update their records? If it is the former,then the answer is you need to pass $id to it, if it is the latter than it is probably a subject for different forum.
Could you please give us more details? Thanks!
View user's profileFind all posts by yfaktorSend private message


Joined: 24 Apr 2006
Posts: 11
Reply with quote
I have user "joe" and I want joe to be able to update his record only. How do I pass joes $id to the script?
View user's profileFind all posts by cjacksSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Your question sounds like "how to organize my DB properly".
You may want to add a table where your users will be listed with their IDs.
Then correct select statements and use this new table in joins...

Actually it all falls into RDBMS area and shouldn't be on this forum board Smile
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Form update mode
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic