Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialKonrad Pilch
2,435 PointsPHP User Profile
HI,
Could somebody help me making a user profile?
Lets assume i want to make a web like facebook.
I have a database with name, last name, id, email , about . Now 5 users signs in and each ofthem can log in and have the same looking profile with different informations about them.
HOw can i do this?
Everything is outdated out there .
2 Answers
Kevin Korte
28,149 PointsWhat you're asking for is way bigger than what can be answered in the forum. Yes, many of the PHP tracks are showing their age, but many of the principals are still the same.
I'm assume you'd use PHP for this, and the most common choice of a database would be MySQL. You would create your Users table, have a form to sign up, have PHP gather their form information, make a connection to the database using PDO, and insert the new record. To sign in, you'd look at using PHP sessions.
Frameworks like Laravel make doing this a lot easier, however it can be built from scratch as well. By today's best practices, you'd want to use an MVC layout to accomplish this.
You'll probably like this: https://www.youtube.com/playlist?list=PLfdtiltiRHWF5Rhuk7k4UAU1_yLAZzhWc and their entire youtube channel.
Konrad Pilch
2,435 PointsThank you for the answer.
I did spend quite a bit of time in the database and got familiar with it so im comfortable with it . I did also made a registration form with PHP as well as i did follow some tutroails from [Brad}(https://www.youtube.com/user/hussey17) and it helped me. I feel i could leave PHP and go learn JS and having a good, easy website with combination in it i mean stuff like loops for each team member added etc.. or menu in array etc.. but i feel this is like basics or begginer stuff and i want to move to the advanced stuff like facebook sessions etc..
Im using windows this summer unfortunataly. WIndows 8. I did try laravel , i find it too hard on windows.
I checked out that video before, i did it but i had some errors before i got to the session which i posted on treehouse but coudnt find the error. I will check it again now and ill see if my new knowledge help me somehow.
I tried books, i find it way too complicated : p or maybe im lazy and i cant read it . Though id would do an easier way than whats in the book when talking about form submiting. Maybe their doing advanced stuff : p
Iwill try it again and thank you .
What i want to do is a treehouse/facebook website. Treehouse website more likely , like the new boston and have features like in job board website like categories . I find it hard to learn , i don tknow if thats just me or im looking in wrong places. I even bough a udemy course which is good in the begginign, but in making a social forum , it didnt go as well as the first few of his videos and i didnt looked at it more as its too messy and too much pasting plus the final version does not work .
Konrad Pilch
2,435 PointsKonrad Pilch
2,435 PointsHI again : p What do you think about this video? https://www.youtube.com/watch?v=4N1ufhv4kzQ&list=PLfdtiltiRHWGKUvioJly40RJZchSG2-34&index=2 in short is it good? im asking as its long and i dont really know what hes doing there : p
Kevin Korte
28,149 PointsKevin Korte
28,149 PointsYeah, he's setting up a framework called Slim. Never used it, but it would be along the same lines as Laravel. Nothing wrong with it.
Konrad Pilch
2,435 PointsKonrad Pilch
2,435 PointsWhat do you think would be the best to do? Learn it with pure PHP or go and follow his Slim tutorial?