By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,664 Members | 1,643 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,664 IT Pros & Developers. It's quick & easy.

allow users to update their own info in a MySQL db

P: n/a
I have a db of people in a group and want to allow individual group
members a way to view and update their own contact information, but not
anyone else's. I assume the safest/smartest way is via the php script
checking the user/pwd of the form submitter to determine if the update
query should be allowed (using a user permission given to the script,
not the individual).

Oct 1 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a

William Gill schreef:
I have a db of people in a group and want to allow individual group
members a way to view and update their own contact information, but not
anyone else's. I assume the safest/smartest way is via the php script
checking the user/pwd of the form submitter to determine if the update
query should be allowed (using a user permission given to the script,
not the individual).
Hi,

Without knowing the first thing about your setup, I'd say: yes.

I always use sessions for this.
User logs in: If username/password are correct, set $_SESSION["userid"]
= ...
The if they later on change their contactinfo:
$SQL = "UPDATE .... WHERE (userid=".$_SESSION["userid"].");";

Regards,
Erwin Moller
--
============================
Erwin Moller
Now dropping all postings from googlegroups.
Why? http://improve-usenet.org/
============================
Oct 1 '08 #2

P: n/a
Erwin Moller wrote:
>
>
Without knowing the first thing about your setup, I'd say: yes.

I always use sessions for this.
User logs in: If username/password are correct, set $_SESSION["userid"]
= ...
The if they later on change their contactinfo:
$SQL = "UPDATE .... WHERE (userid=".$_SESSION["userid"].");";
Thanks, that's what I thought, but I didn't to get midway into
development and have to change my thinking.
Oct 1 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.