11 Replies - 14857 Views - Last Post: 01 October 2011 - 11:34 PM Rate Topic: -----

#1 hockey97  Icon User is offline

  • D.I.C Regular

Reputation: -77
  • View blog
  • Posts: 300
  • Joined: 25-September 08

making a profile system ..

Post icon  Posted 12 February 2009 - 10:13 AM

ok, I am working on making my profile system.

I am somewhat confused on what is the best way to do this.


Should I store the html and css code in a database???

or should I directly write to a html file?


also what is the best way to id the users. I plan to make their profile public. So I need a way so I can id different pages to display.

I plan to have one page as the profile and just load in data from the database or the file stored on the computer.


Or should I just plain out have html documents for each user?

I was told to make a database and store the code in the database so that it is editable since I plan to have a edit profile system.


So I am asking if I so make the profile for each user and save it as a different file or just have the code be stored in the database which I can then edit the code with my edit system.

Is This A Good Question/Topic? 0
  • +

Replies To: making a profile system ..

#2 Hary  Icon User is offline

  • D.I.C Regular

Reputation: 44
  • View blog
  • Posts: 427
  • Joined: 23-September 08

Re: making a profile system ..

Posted 12 February 2009 - 02:18 PM

Make a php file containing all logic that generated your html with all changing data in a databse.

For presentation, you can add a single CSS file to make it nice.
Was This Post Helpful? 0
  • +
  • -

#3 hockey97  Icon User is offline

  • D.I.C Regular

Reputation: -77
  • View blog
  • Posts: 300
  • Joined: 25-September 08

Re: making a profile system ..

Posted 12 February 2009 - 09:11 PM

ok, so make a php file and have that display the html and css of the persons page.

Well then one more question which would be how do I allow other users to see this profile?

I want to make the profile page to be public to users. I can't have the person log in and grade the users profile cause if that was the case then all users will only see their own profile and not others.

I need a id system to be able to call out upon a user request.

is there a way I can rename the url link and that link when typed in would take the person to that persons profile?

I am kinda thinking off my head and I am confused.
Was This Post Helpful? 0
  • +
  • -

#4 kiwi2  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 8
  • View blog
  • Posts: 178
  • Joined: 16-September 08

Re: making a profile system ..

Posted 12 February 2009 - 11:35 PM

There r many mysql tutorials have a look at how to set up a database, the necessary fields and how to use them, this site has numerous resources.
Was This Post Helpful? 0
  • +
  • -

#5 sam_benne  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 16
  • View blog
  • Posts: 732
  • Joined: 16-January 08

Re: making a profile system ..

Posted 13 February 2009 - 12:58 AM

If you have your members in a database table then they will most likley have an ID. What you do is you create one page (PHP) that has all the styling etc. Then for each user Say you create a link to go to a specific user the url would go something like user.php?id=##. Where the ## are you put their ID.

On the user.php page or whatever you call it. You can do a mysql Statement that gets all the data from the members table where the ID matches the ID in the url.

Hint to get ID from url do $id = $_GET['id'];

Need anymore help just ask.
Was This Post Helpful? 0
  • +
  • -

#6 hockey97  Icon User is offline

  • D.I.C Regular

Reputation: -77
  • View blog
  • Posts: 300
  • Joined: 25-September 08

Re: making a profile system ..

Posted 15 February 2009 - 08:57 PM

ok, I see thanks.

one more thing. I plan to later on once I am done with the basic structure of the website .I will plan to use the rewrite modual for apache.

So would if I used that rewrite would I still be able to allow users to create their own id name.

Like instead of id=153 iI could make it like www.mysite.com/userdude

or would it not be possible cause of php needing the get method to pass the info to my scripts?

I plan to try and use that rewrite url modual for apache.

that is really it. You guys answered my main question.

I can now see it.

Thanks for the help.
Was This Post Helpful? 0
  • +
  • -

#7 hockey97  Icon User is offline

  • D.I.C Regular

Reputation: -77
  • View blog
  • Posts: 300
  • Joined: 25-September 08

Re: making a profile system ..

Posted 19 February 2009 - 03:43 PM

View Postsam_benne, on 12 Feb, 2009 - 11:58 PM, said:

If you have your members in a database table then they will most likley have an ID. What you do is you create one page (PHP) that has all the styling etc. Then for each user Say you create a link to go to a specific user the url would go something like user.php?id=##. Where the ## are you put their ID.

On the user.php page or whatever you call it. You can do a mysql Statement that gets all the data from the members table where the ID matches the ID in the url.

Hint to get ID from url do $id = $_GET['id'];

Need anymore help just ask.



Well with the id system. Would I still be able to rewrite the url using the apache rewrite mod?
Was This Post Helpful? 0
  • +
  • -

#8 sam_benne  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 16
  • View blog
  • Posts: 732
  • Joined: 16-January 08

Re: making a profile system ..

Posted 20 February 2009 - 03:11 AM

Yes you can
Was This Post Helpful? 0
  • +
  • -

#9 hockey97  Icon User is offline

  • D.I.C Regular

Reputation: -77
  • View blog
  • Posts: 300
  • Joined: 25-September 08

Re: making a profile system ..

Posted 20 February 2009 - 10:54 AM

View Postsam_benne, on 20 Feb, 2009 - 02:11 AM, said:

Yes you can


Ok, so when I use the apache_mod module. I can rename lets say. www.mydomain.com/profile.php?id=10984

to something like www.mydomain.com/username(or custome name)

so where username is ... would be their username or they can create their own nickname or something like that.

Well If I understood it right then I am set to go. Thanks.
Was This Post Helpful? 0
  • +
  • -

#10 hockey97  Icon User is offline

  • D.I.C Regular

Reputation: -77
  • View blog
  • Posts: 300
  • Joined: 25-September 08

Re: making a profile system ..

Posted 20 February 2009 - 03:30 PM

ok, one more question I have.


it's about the html and css.


I want to know if I should just put the html code and css values in the database?


Cause I want users to be able to add new stuff and delete old stuff from the layout.

so I will have a default layout. Then I will have a edit system using javascript. Where you can grab or select elements on the layout and delete them and I will have a area on the screen to add new tables or photos or videos or music player to the layout.

So basicly I will be using php and javascript that when those things are click from that area to add to the layout it will add the html code.

Now nowing that this layout can be edited to customizes the layout to the user.



I want to know the best way to use less code and less memory to do such a thing.


I was thinking to store all html code and css values in a database of that user. Then using php to echo that code.

Now if they made changes I could just overwrite the data in the database.


So I asking if I should store the html and css code in a file and edit the files using php?


Or is it better to just store the html and css values in a database and then use php to grab and manipulate it using the database?


Thanks for the help.
Was This Post Helpful? 0
  • +
  • -

#11 PixelBit  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 233
  • Joined: 17-July 11

Re: making a profile system ..

Posted 01 October 2011 - 10:33 PM

View Posthockey97, on 20 February 2009 - 03:30 PM, said:

ok, one more question I have.


it's about the html and css.


I want to know if I should just put the html code and css values in the database?


Cause I want users to be able to add new stuff and delete old stuff from the layout.

so I will have a default layout. Then I will have a edit system using javascript. Where you can grab or select elements on the layout and delete them and I will have a area on the screen to add new tables or photos or videos or music player to the layout.

So basicly I will be using php and javascript that when those things are click from that area to add to the layout it will add the html code.

Now nowing that this layout can be edited to customizes the layout to the user.



I want to know the best way to use less code and less memory to do such a thing.


I was thinking to store all html code and css values in a database of that user. Then using php to echo that code.

Now if they made changes I could just overwrite the data in the database.


So I asking if I should store the html and css code in a file and edit the files using php?


Or is it better to just store the html and css values in a database and then use php to grab and manipulate it using the database?


Thanks for the help.

nope, i wouldnt do that, you should save user preferences in a cookie, or database if you wish, things like avatar = true and in php just do if(avatar){display avatar code}. its a good idea to try and keep your html in one file your php in others, css in another and just have yor database store necessary data.
Was This Post Helpful? 0
  • +
  • -

#12 hockey97  Icon User is offline

  • D.I.C Regular

Reputation: -77
  • View blog
  • Posts: 300
  • Joined: 25-September 08

Re: making a profile system ..

Posted 01 October 2011 - 11:34 PM

View PostPixelBit, on 01 October 2011 - 11:33 PM, said:

View Posthockey97, on 20 February 2009 - 03:30 PM, said:

ok, one more question I have.


it's about the html and css.


I want to know if I should just put the html code and css values in the database?


Cause I want users to be able to add new stuff and delete old stuff from the layout.

so I will have a default layout. Then I will have a edit system using javascript. Where you can grab or select elements on the layout and delete them and I will have a area on the screen to add new tables or photos or videos or music player to the layout.

So basicly I will be using php and javascript that when those things are click from that area to add to the layout it will add the html code.

Now nowing that this layout can be edited to customizes the layout to the user.



I want to know the best way to use less code and less memory to do such a thing.


I was thinking to store all html code and css values in a database of that user. Then using php to echo that code.

Now if they made changes I could just overwrite the data in the database.


So I asking if I should store the html and css code in a file and edit the files using php?


Or is it better to just store the html and css values in a database and then use php to grab and manipulate it using the database?


Thanks for the help.

nope, i wouldnt do that, you should save user preferences in a cookie, or database if you wish, things like avatar = true and in php just do if(avatar){display avatar code}. its a good idea to try and keep your html in one file your php in others, css in another and just have yor database store necessary data.


well, my goal is to try and make a profile editor system that allows the client to program their own webpage without touching a single line of code.

so I was hoping if there is a way where I can generate the if statement and then store it in a file or store it in the clients webpage source code.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1