user login can edit their record only - PHP / MySQL

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I'm fairly new to developing PHP / MySQL databases. I've just created a
job posting board that works OK, but I want this feature: user creates
their username/password to enter a listing. Once they've entered a job
listing, they can login again and will be able to edit / drop their
listing only. Any pointers in the right direction would be appreciated.

Re: user login can edit their record only - PHP / MySQL

Too broad a question, my friend. The answer would be "you need to read
a little about db design and how it applies to php projects".
Basically, if you for example have two MySql tables, one of them with
the user data and another with their listings data (assuming one user
can have more than one of these "listings"), you need a way to identify
wich listing/s belong to wich user/s. Usually this wil be a field in
the listings table containing the name (or any other handle/key you
have assigned to the users) of its corresponding user.

Site Timeline