runnerjp Posted November 20, 2007 Share Posted November 20, 2007 hey guys... i know how to enter data into database look it up and change it ect ect... what im wondering is how can i make it so each user gets there own page to come up with there profile on.... hard to explain but example when you sign onto facebook your own profile comes onto the screen... is there away in which i can creat 1 page to fit all but user persific stuff will apear on page?? hope that makes sense... any websites point in directions anything will be helpfull.. as im new to this as much information a spossible would be nice also examples to follow... alot i know but i know you guys are the ones to ask thankyou Quote Link to comment Share on other sites More sharing options...
adam291086 Posted November 20, 2007 Share Posted November 20, 2007 ok. What you could do is have the logon script that calls on a username and password from the database. This is to validate their logo details. In the table that stores the users details you should place an profile ID. This links the users indivdual profile page to them. Once logged in you redirect the user to a new page. In this page you can use the POST method to get the users details and then use them to display there profile via a query on the database using the users details. I hope this makes sense Quote Link to comment Share on other sites More sharing options...
runnerjp Posted November 20, 2007 Author Share Posted November 20, 2007 so is this correct wen regestering a usser will add username and password ... to the database it will also add a id so 00001 so if i creat anouther database and also add the id it can link the id to the id in the registration script.... is this correct :S lol Quote Link to comment Share on other sites More sharing options...
adam291086 Posted November 20, 2007 Share Posted November 20, 2007 when a new user registers you will set your script up to automatically add there details to the logon table and add an default profile to the profile database. This default profile will be the bear basics of a profile page i.e title and description. You wont need two databases. Just one database with two tables, like below Table 1 ~ User User ID Username Password Name Profile id Table 2 ~ Profile Profile ID Title Description Quote Link to comment Share on other sites More sharing options...
sstangle73 Posted November 20, 2007 Share Posted November 20, 2007 right and then when they login you prolly want to set a session var. then when you want a user spcific page oyu call their data into an array and show it on the screen. http://stangle.info ive dont it in my free time just playing. msg me if you need some help aim sstangle73 Quote Link to comment Share on other sites More sharing options...
PHP_PhREEEk Posted November 20, 2007 Share Posted November 20, 2007 This is very possible, as you already know... Can you do it? Well, if you have nothing so far, it might not be looking good... you're talking about an extremely complicated setup (anything on a per-user basis gets complicated fast). Anyways, there's probably at least 100 ways to approach this. I would search the 'net for a starter script that kind of does what you want, or even just a portion of what you want, then start modifying it. I've got to be honest with some of you guys sooner or later... taking on projects this large is just not practical. You will burn out and maybe even eventually quit coding all together. When you learn to be an engineer, do you jump right in and try to build a fully-functional bridge across a river? No, you gotta start small... You have to 'code within your means', and challenge yourself little bits at a time to increase your knowledge. Again, I'm being honest here... something like Facebook was coded by a TEAM of people, not one dude hanging out in his bedroom. I love helping new coders learn things and move up the ladder, but on the other hand, I hate seeing guys be unrealistic and end up burnt out. You would do yourself the biggest favor by downloading other people's scripts and modifying them. You learn very quickly that way. You cannot code from scratch without a vast base of knowledge. With all that in mind, I'm sure quite a few will jump in with a few ideas, so good luck with it! PhREEEk Quote Link to comment Share on other sites More sharing options...
runnerjp Posted November 20, 2007 Author Share Posted November 20, 2007 thanks i have took on the ideas ... i did think about phreeek's idea of downloading someones script and editing them.... the only problem with this is that i can find any scripts to edit lol... if any 1 can add to ideas with where i can find scripts that i can chnage to suit my needs please add it here Quote Link to comment Share on other sites More sharing options...
~n[EO]n~ Posted November 20, 2007 Share Posted November 20, 2007 http://www.opensourcecms.com here you can find lots of Open Source CMS. There maybe one EDIT: sorry I left the e in open Quote Link to comment Share on other sites More sharing options...
runnerjp Posted November 20, 2007 Author Share Posted November 20, 2007 n~ link=topic=168428.msg742685#msg742685 date=1195559667] http://www.opnsourcecms.com here you can find lots of Open Source CMS. There maybe one thanks but sadly the website did not work can i say im impressed with the level of feedback given Quote Link to comment Share on other sites More sharing options...
trq Posted November 20, 2007 Share Posted November 20, 2007 This simple example should get you started. Quote Link to comment Share on other sites More sharing options...
runnerjp Posted November 20, 2007 Author Share Posted November 20, 2007 humm anything more? looking for simple update script sstangle has exactly what im looking for ... update profile fields ect Quote Link to comment Share on other sites More sharing options...
trq Posted November 20, 2007 Share Posted November 20, 2007 What exactly are you stuck with? Its a pretty straight forward concept especially if.... i know how to enter data into database look it up and change it ect ect... Quote Link to comment Share on other sites More sharing options...
runnerjp Posted November 20, 2007 Author Share Posted November 20, 2007 i know the basics..... but this seems to be harder.... like how can i have 1 page every 1 goes to e.g mywebsite.com/profile and everyone have there own information on there Quote Link to comment Share on other sites More sharing options...
adam291086 Posted November 20, 2007 Share Posted November 20, 2007 if you have everything stored in a database and set the script to call on the individuals profile. Then no matter what pc you log onto the information will be there. PHP_PhREEEk is right about it getting complicated and the basics wont do here. Quote Link to comment Share on other sites More sharing options...
runnerjp Posted November 20, 2007 Author Share Posted November 20, 2007 ok i will give it ll ago thanks guys Quote Link to comment Share on other sites More sharing options...
trq Posted November 20, 2007 Share Posted November 20, 2007 If your users are logged in already, its simple. Query the database for information related to a users id. eg; <?php // connect to db here. session_start(); if (isset($_SESSION['userid'])) { $id = $_SESSION['userid']; $sql = "SELECT id, uname, moredetail, email FROM users WHERE memberID = '$id' LIMIT 1"; if ($result = mysql_query($sql)) { if (mysql_num_rows($result)) { $row = mysql_fetch_assoc($result); echo $row['id'].'<br />'; echo $row['uname'].'<br />'; echo $row['moredetail'].'<br />'; echo $row['email'].'<br />'; } } } ?> Done. A big part of learning to program is learning to think logically. One big problem can usually be broken down into lots of smaller problems. If you want your users to be able to edit there details you'll need. * A page which displays the users details (retrieved via a session, as above) within a form. * A page that processes any changes users made via the above form. Its really not that hard. PS: The code above is pretty much taken verbatim from the link I posted a few replies ago. I just made it select via a session variable rather than an id passed via the url. Quote Link to comment Share on other sites More sharing options...
PHP_PhREEEk Posted November 20, 2007 Share Posted November 20, 2007 A big part of learning to program is learning to think logically. One big problem can usually be broken down into lots of smaller problems. Bingo. Sometimes it's the hardest thing to put into English words as to why a project may be over a programmer's head, but the concept of what 'modules' the project consists of, is either there or isn't. Any site that is going to be public and developed specifically for public use and modification is going to need some VERY tedious modules and attention to details. Security and site searching spring to mind. Two things that are infinitely BORING to program, yet without them, the site would never flourish. I don't know how a lot of the other pro scripters around here really got their wheels rolling, but in my case, I involved myself with open source projects and worked on the specific modules that were needed. I analyzed other modules that were written by other team members and learned even more. Starting an ambitious project from scratch would run you into wall after wall after wall, eventually really nailing you against something you simply could never achieve (this is oh so prevalent once it becomes time to concentrate on security!). You could start a project like this, get ultimately completely frustrated and dejected, or take my suggestion... Look around for open source projects. Download their filesystem and start digesting parts of it. Join their tech support effort and begin answering questions about the software to the users. The user's questions will make you jump into the code and find the answer for them. Users will request modifications. You will learn to jump into the code and make those modifications. Before you know it, a few months down the road, the team may approve you as a coding member. If you did your project for a year, you would be burned out and not have anything NEAR a working and secure site. If you did what I suggested for a year, you would be a very accomplished software tech. You can work on your 'dream project' on the side, and successes or failures won't really matter. You'll get all the satisfaction you need from working with a team on a valid and working project. Bonus! You'll have a bunch of coders as friends who will help you with your personal project! Well again, best of luck with whichever path you choose. PhREEEk Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.