|
|
| |||||||
| Programming Programming help, snippets, articles, tutorials, features and related discussions. |
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Member Join Date: Aug 2007
Posts: 31
Rep Power: 0 ![]() | Ok, I've searched other posts but got somewhat confused with everything. I've installed the login script, it works fine. Got myself as an admin, can register, etc. etc. Now i'm wondering how to do this: I want to have the "login sucessful, welcome USERNAME" to be their personal profile. My website is an article site, on each article page I want to put a button saying "add article to profile favorites" this button will add the url to their personal profile. This way, any time they log in, they can see their favorite articles on their personal profile page. this is one of the last things holding me back from finalizing the website. Any help is MUCH appreciated. ps: i'm a n00b at php and mysql... So you're basically speaking to a retard. |
| | |
| Sponsored Ads | #1.5 |
| Sponsored posting Join Date: The beginning
Posts: lots
| Sponsored by... WM Media - Sell Your Website at above market prices!
|
| |
| | #2 (permalink) |
| Administrator Join Date: May 2007 Location: Bucharest
Posts: 649
Rep Power: 10 ![]() | You're not a retard if you don't know PHP. Everyone must start from somewhere. From my understanding, you want the members.php with that login successfull message to present their article bookmarks? You could do a query based on session to display those bookmarks. If you don't know how to doit...send me the mysql table that holds the bookmarks and we'll sort it out somehow.
__________________ Give a man a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime. |
| | |
| | #3 (permalink) | |
| Member Join Date: Aug 2007
Posts: 31
Rep Power: 0 ![]() | Quote:
correct, I want the members.php with that login successfull message to present their personal article bookmarks. I'm not sure how to go about the mysql table that holds the bookmarks. I'm not sure how I would add a table that would hold the URLs to the bookmarks. I don't even know what code would display them properly as links. I'm going to keep searching for my answers, as I don't want to waste too much of your time. But any help or examples would be awesome. | |
| | |
| | #4 (permalink) |
| Administrator Join Date: May 2007 Location: Bucharest
Posts: 649
Rep Power: 10 ![]() | Ok...how do you store the articles that your members bookmark? How do you know which what bookmarked? Isn't that supposed to be stored in a mysql table?
__________________ Give a man a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime. |
| | |
| | #5 (permalink) |
| Member Join Date: Aug 2007
Posts: 31
Rep Power: 0 ![]() | I'm not sure how to store the articles. I'm assuming that I would somehow have the "bookmark article" button(on the article page) grab the URL of that page and add it to the list of saved bookmarks in that persons profile. So, it should save the URL into a table on the mySQL database... all i have is what the download came with and what I read in the tutorial. I opened up the phpmyadmin, clicked the sql button(i remember that from another tutorial i used) and then posted the code into the box that popped up. This created my tables(?). My mind is being racked, trying to figure out how to do this. I must have read 20 full tutorials in the last few hours. |
| | |
| | #6 (permalink) | |
| Administrator Join Date: May 2007 Location: Bucharest
Posts: 649
Rep Power: 10 ![]() | Quote:
That persons profile is stored where? A mysql database I presume...you must have a storage engine to work with. Ideal would be to have a "Bookmark" link or button (login to roscripts.com and browse any of the snippets, scripts, articles or resources and locate the green "Bookmark" link that sits under each record to see a live example) that uses ajax to save the link under the user's profile. It's a little complicated but it's better this way since it will be a total waste of time to reload the page or navigate the user to another page just to do the insert. On roScripts, I use xajax and some php to do the magic trick. Anyways, it's a little more complicated than, I think, you're expecting. First you have to create the way for users to add articles to their profiles and after that think of a way to display them on request.
__________________ Give a man a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime. | |
| | |
| | #7 (permalink) |
| Member Join Date: Aug 2007
Posts: 31
Rep Power: 0 ![]() | that's crazy, I thought of that idea on my own... just to find a website that already has it... I didn't think anyone had that, i've never seen it before. What you have, is exactly what I want to do. This is the impression i'm under: The user clicks the "bookmark" link, and when they do that, the title of the article and the url are both saved into a mySQL database.(i'm not sure how to make it so when they click the button, it writes the title of the article and the URL to the mySQL database). Then when the person logs in, they are brought to their profile page. On their profile page is the list of articles they have bookmarked.(so when their profile page is loaded, it displays all of the bookmarked articles that have been stored by them in the mySQL database.) |
| | |
| | #8 (permalink) |
| Administrator Join Date: May 2007 Location: Bucharest
Posts: 649
Rep Power: 10 ![]() | well it's not that hard to do just that it needs some knowledge. I can help you out but would need the software that you use in order to figure out how to implement the widget :P
__________________ Give a man a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime. |
| | |
| | #9 (permalink) | |
| Member Join Date: Aug 2007
Posts: 31
Rep Power: 0 ![]() | Quote:
One thing I can't figure out is how to best format this into a mysql table. Should there be 1 table with 4 columns, USER_ID, ARTICLE_TITLE, ARTICLE_URL and ARTICLE_DESCRIPTION ??? If I had a thousand users, and each of them bookmarked only 5 articles, that would be 5,000 lines in that one table. Isn't that a lot? And if everyone bookmarked 20, that's 20,000... Wouldn't that be really slow? Is there a better way to accomplish what I'm trying to do? *hits head against wall* | |
| | |
| | #10 (permalink) |
| Administrator Join Date: May 2007 Location: Bucharest
Posts: 649
Rep Power: 10 ![]() | My tracking software makes 5000 lines a day and a lot more content is inserted. You don't need the artile title and article url when you already inserted the article Id. You can make connections based on that ID when you need them... |
| | |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Must Read!! Work with Adsense With No Click Necessary To monetize your Websites/Blogs | infogetonline | Adsense | 10 | 01-23-2008 02:39 PM |