Copy link to clipboard
Copied
Hi. I have just started using dreamweaver and I have no experience in PHP coding and would like to start. So far i managed to get by using dreamweaver tools and without coding any PHP or all all for that matter. I have created a form where you fill it up and it sends the data to mysql. From there i made the dynamic table to display ALL the data from the tables from the database. My question is, if someone has filled up the form and wanted to edit/delete it, how should i code it that when the user enters his/her name or a given number, he/she can only access what he/she has filled up. For example, my name is Shaun, and i filled up a form. After that i wanted to delete it. How do i do it in a way where i only enter my name and only my record comes up? I wouldn't want someone else to have their name/number to edit or delete their own record. Any help would be appreciated. Thank you in advance.
Copy link to clipboard
Copied
Typically you would start with some kind of authentication system that would require users to login using a username and password. Once they are authenticated, you store their login credentials in a session variable. You then use that session variable in the WHERE clause of the SQL statement to ensure that they are accessing only their information.
I have to say that if you have no PHP experience you are going about this kind of backwards. The first thing you need to do is learn the language; it's structure, syntax, common functions, etc. There are lots of great books and tutorials that don't take long to go through. That will give you some foundation. As you go through the tutorial, you will begin to see how to apply the concepts to your current problem. If you just try to fumble your way through building the application you have in mind, it will be quite frustrating and take a long time.
Copy link to clipboard
Copied
Thanks for your help, i youtubed session variable and managed to complete it. I'm doing a project for school in my final year and i had to do a website and a form without any basic knowledge. But yeah, i'll probably start learning php soon for my benefit too. Thanks again!
Copy link to clipboard
Copied
OK, excellent. Good luck.