Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,141 members, 7,818,432 topics. Date: Sunday, 05 May 2024 at 03:31 PM

To Create Individual Profile For New Users Or Not - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / To Create Individual Profile For New Users Or Not (1205 Views)

High Profile Twitter Accounts Hacked By Bitcoin Scammers / April Foolll!!! MTN Cheat New Users 2GB Old Users 1GB Hurry!! / [Advice] For New Programmers, what server-Side Programming Language Is The Best? (2) (3) (4)

(1) (Reply) (Go Down)

To Create Individual Profile For New Users Or Not by olasesi(m): 2:09pm On Jan 03, 2018
I am working on an ecommerce website that users will have their own page, like the profile page on Facebook or that on nairaland. eg nairaland. com/olasesi, it's probably nairaland. com/olasesi.php but htaccess rewrote it that way, I know.

<b>What is the advantage of creating dynamically a page for individual user. Why not just use a single file and then choose the variables from the database. eg xyz. com?id=23&username=olasesi. Do people think it's better to have several pages of individual even as the content of the file would most likely be the same? It would contain the same header and footer and at best use php includes.</b>
Re: To Create Individual Profile For New Users Or Not by LaiveNg: 1:40pm On Jan 05, 2018
An excellently wrong idea! What happens when you want your users to edit their profiles? You create separate edit_profile.php for each of them, right? WRONG!
Re: To Create Individual Profile For New Users Or Not by olasesi(m): 7:08pm On Jan 06, 2018
LaiveNg:
An excellently wrong idea! What happens when you want your users to edit their profiles? You create separate edit_profile.php for each of them, right? WRONG!

It's php that would do the job. e.g UPDATE users SET date_expires = ADDDATE ... etc. It's all going to be dynamic. I can change anything of the profile. One would not be able to change the profile of others, only one's profile can be edited, because the id of individual user is different. The first if condition would be if one is logged in, and the next nested if would be if the username id in the database is the same as the username .php. If its not, that means its another persons profile. You can only see it but can edit it. Just like Facebook and nairaland.
Re: To Create Individual Profile For New Users Or Not by olasesi(m): 7:13pm On Jan 06, 2018
LaiveNg:
An excellently wrong idea! What happens when you want your users to edit their profiles? You create separate edit_profile.php for each of them, right? WRONG!

In fact, one can have a general edit page for all users, just as nairaland does. But the profiles are different and individual.
Re: To Create Individual Profile For New Users Or Not by LaiveNg: 8:53pm On Jan 06, 2018
olasesi:


In fact, one can have a general edit page for all users, just as nairaland does. But the profiles are different and individual.
I can't try to implement such a design because I think it won't be efficient and the main purpose of PHP as a language for building dynamic sites will be rendered almost useless.
.
Also, there will definitely be some performance issues when total users hit tens of thousands up to even millions... For example, with this design, NL with over 1.5 million users will potentially have 1.5 million files, each file for a user... Wow! To me it's worthless!
.
However, i think this design pattern will be suitable for strictly non-database-driven applications...
Re: To Create Individual Profile For New Users Or Not by klazbaba(m): 12:54am On Jan 07, 2018
Having a single page where the information gets to change depending on the current user is better. Like someone mentioned, would you now have let's say 50 different pages for 50 users? And moreover, you'll give yourself more headache in trying to do this. And when it comes to maintenance later on, it will give you too much unnecessary work. Computers are meant to make things easier for us, let us maximize that.
Re: To Create Individual Profile For New Users Or Not by Kingdolo(m): 6:06pm On Jan 07, 2018
A single page should get the job done.

(1) (Reply)

Ubiquti Home Server/network Help / How To Print Diamond With A Frame Using Java / Expert In Microsoft Excel

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 14
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.