Inserting username password to database n validating them in php
For example someone makes an account with: Username: Person Password: hello Email: [email protected]: 111-111-1111Name: Hello Person When they log into the site using their username and password, how can I detect their email/phone/name? Hi this is what I have set up -SQL tables -Members - memberid - primary key Username Password Orders - Orderid - primary keymemberid - foreign keyorderno In my sql table there are two members and two orders.1 order is assigned to 1 member and the other order to the other member.
After each member logs in I need to 'echo' that order on the page. or one table consisting of staff, with the members details written into the staff's row?
What i want to do is that when the user who is logged in have administrator in the user_level field to see all the pages from backend, and the user who have in the user_level field editor to see only some of the pages from the backend such as newsletter, or messages.
I hope you understand what i'm asking if not fell free to ask me if you need more specific details.
My query is how do I output or display the information that is specific to the user which is currently logged on and block access to any other users information.
I am quite sure there is a simple solution that is escaping me.
Now, how can I include only those two values in the select clause. I've started to make a website where users can log in and submit items to a database, which is then displayed on another page.
Say, Select Electrical, Main Location from table where Main location=' QLD'. If Tom and Bill both post 10 items, all 20 items will be displayed on the "listings" page, however on the main log in screen Tom will only see his own 10 items and Bill will see his own 10 items.
I also have a form that users provide information and it is successfully inserting data into a table in my database.category_id=" str,true);or most likely in my codewhen I wasn't using AJAX and using POST it worked fine, but adding the AJAX stuff and GET it doesn't work.When I echo out the SQL the result is Code: [Select]SELECT * FROM sports INNER JOIN players ON sports.category_id = players.category_id WHERE players.category_id = ''so the category_id is not being selected properly and that is the primary key/foreign key in the My SQL table which connects the JOIN.would the best way be to try to match the user's "username" stored in a $_SESSION when fetching his info, something like this: Code: [Select]So, my question is, are this actually working differently? Hi, I have created a session based logon system using php and MYSQL from some tutorials I found online which is working very successfully.is one better than the other as far as security, preventing other users from hacking either on purpose or accidenally into other user's details? I can log on and of and move through different pages with no problems.