Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have built a login application (App), and I'm thinking of implementing another feature.
I want to show users specific content depending on which user is logged in. For example, say I'm user "Dream". When I log in, I should only see the files that are related to me, such as my downloads, images, and so on.
How could I implement this?
If you have data in database, users has probably its own ID. Personalized content, as images for example, then has to have user ID mark (it creates logic connection). After user is logged, save its ID into session. After he show page with images, pick up user ID form session, select images with user ID mark from database and display them.
If your data are not in database, principle will be the same.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I'm working on job engine project at the moment of this project I need to add button to ads for apply the vacancy by users and I need to this apply button send user data to the publisher company. for more understanding i give an example:
company will publish ads
user click on apply button in that ad
the button will get info from user profile and send it to company dashboard includes name,email,about, etc. but the most important is to send user CV's link to download by the company.
my question is: who can I approach that idea? currently I'm out of idea how to do that, i need to know what functions I have to use to make this happen?
thanks.
ok i will give you the steps hoping that all the data of a student is saved in the database
the user should be logged in
get the id of the logged in user on click on apply button, like a form where it will call a controller function where you will retrieve the id of the authenticated user.
in that function query the database table of user and select all information
wrap them and send an email or a message to the particular company.
hope it helps
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am buiding a licence style system where a user can buy one or a number of licences. They can then log in to the system only once with each licence (similar to Spotify). So a user buys 2 licences. They can log in once in Firefox and once with Chrome. If they try to log in using IE the system will prompt/warn that they will be logged out of another session.
I understand a user could just use multiple instances of the same browser to gain access to multiple sessions/screens but thats fine. We are really only trying to stop users from using multiple devices (2+ separate PCs) if their licence restricts.
Any idea how I would go about this? Can I check session data from another instance or should I store the logins in a separate table and check against that?
Thanks
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I already have the info i need in the database. I know how to display the data on the main page, but i only show a small part of info there.
What i need is when i click on the read more i want it to link to a full info page.
How to i accomplish that? Do i have to make/generate a html file for every car i have and link the info from the main page to it? Or what is the correct technique for achieving this ?
It sounds like you want to have a list of cars on a main page, and then clicking on one of these cars would bring you to a details page with more information about that specific car.
This is a common situation. You'd simply have your main page query your car table and format that as a list of cars, each with a link to a details page like /details/12345 where the number represents the ID of the car you want to see. Then your details page would get the ID from the URL, query your database for details of that car ID, and assemble the page with those details.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How would I go about creating a table that is linked to a specific user that can be edited by that user? Basically a user would log in, and they would see a button that took them to a page with a bunch of specifically labeled input boxes. They could put the appropriate data into the boxes and save it. There should also be a drop down menu that contains presets for the data. At first I thought to use a database, but here's the kicker: They need to be able to add and delete input boxes. To recap, the user needs to have their own specific page that allows them to change data in input boxes, as well as add more fields if they require it. This all needs to be stored and linked to their user. How can I do this?
You should realize that in PHP / MySQL. I do not know where you are in your project, if you have already achieved your login pages / sing_up / index ... etc.. but you should start with that. There are good tutorials on the subject, like this one.
http://net.tutsplus.com/tutorials/php/user-membership-with-php
EDIT:
To let user edit their info, look at this tutorial:
http://www.webestools.com/scripts_tutorials-code-source-14-members-area-system-in-php-mysql-members-users-system-area-log-sign.html
After, you will have to ajust your actual structure to the one they give.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Not sure if this is too open-ended of a question for StackOverflow but, I'm trying to make a basic chat client using AJAX, php and mysql. Users can send messages to the chat, but they can't see which other users are in the chat. Is there a good way to track which users are viewing a webpage and which have left?
the simplest solution is to have a database that records sessions, or at least a "last logged in" column in your database. once a user has logged in, it should reflect in the database that he or she has logged in using a time stamp. this session should auto expire in a given amount of time (like say auto logout, or in others the "idle" status)
then have an AJAX "heartbeat" to check the database if that user has logged out or expired or idle as well as return a list of un-expired users.