Jump to content


Photo

My kingdom for an answer! (PHP coding)


  • Please log in to reply
5 replies to this topic

#1 alwaysinit

alwaysinit
  • Members
  • PipPipPip
  • Advanced Member
  • 60 posts

Posted 30 September 2006 - 12:01 AM

Hi, I have a couple of questions listed at the bottom, but felt they needed a lil' background info:(Hence, the novel)
I'm building a musician community. I joined, went and got my email verification, loged in, changed my photo and info,logged out. Joined as my wife, and did all the same for her profile.

The trouble is that I have a button "Your Profile" on homepage, and this is all I know to give to let members see their profile info.

Now when it comes time to build my search script I'm screwed because I cannot figure out how to use "mkdir" in the script that signs my members up. Upon member sign-up I know I have to do something with "mkdir" to give them an area of their own. And I know I have to use a unique field in the database to assign member to their area.(was thinkin' bout using "userid",<---good? or bad idea?)

But that's about it, that is all I know to do and have no idea how to code that bunch of mess and not many other folks do either. I've been asking in various forums for one week now. So now I come here to try.
Questions:
(1) Is it possible for me to put my 'user sign_up' script here, and have someone show me how to code the "MAKDIR" function into it where it does what I need?(make folder in directory for user)

(2) Is it a good idea for me to use the "userid" field as my unique for "makdir"?

Basically my goal is to search profiles, find the two dummies I created then click either thumbnail and it would take me to their profile to view. But in order to make that possible I need different folders for different members.("MKDIR") I don't know how to code the "MKDIR" for my script or where to put it in the 'Sign_up' .php

I will owe whomever helps me a great deal because this last thing is all I need to figure out in order to finish the project by myself. Instead of paying someone $3000-$5000 to build my site.
Thanks a million ~Adam


#2 elis

elis
  • Members
  • PipPipPip
  • Advanced Member
  • 149 posts

Posted 30 September 2006 - 12:15 AM

It seems that it would be simpler to create sessions for each user who signs up, and use the session variables to call up the user's specific information via mysql instead of using folders.
That is if I'm understanding what you're trying to do?

#3 alwaysinit

alwaysinit
  • Members
  • PipPipPip
  • Advanced Member
  • 60 posts

Posted 30 September 2006 - 12:48 AM

Thanks, I'm looking to make customizable profiles for say, 25,000 members similar to myspace

#4 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 30 September 2006 - 01:00 AM

What exactly do you need to store in this directory your trying to create? Usually a members profile would be stored in a database, and addititional files they may upload would be stored with there user id tacked on to them. Thus, you dont need to make a directory for each member.

#5 alwaysinit

alwaysinit
  • Members
  • PipPipPip
  • Advanced Member
  • 60 posts

Posted 30 September 2006 - 01:27 AM

photos, mp3's, and a few other things. The profiles will be customizable using templates that I create(not user html). About 100 templates.
please go on, i'm very interested in what you're saying. I'll prolly wind up with 100,000 mp3's, relative amounts of the other things.


Wait, how do I make a link to various peoples profiles in my search results if I have no place to link to?

Can I link search results to the database?

#6 Gaoshan

Gaoshan
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 30 September 2006 - 05:32 AM

For 1: Create a basic template that can draw the data it needs (or in the case of files it can draw on the location of the files), based on userid and password, from your database and populate it. Do this rather than creating a directory for each user.

For 2: Not unless you take pains to enforce unique IDs.

To link various profiles you could, as one of many possible ways, pass variables to your profile page using GET  as part of a link
<a href="profile.php?id=' . $theid . '">
and have the database use the GET info to pull data for the page.
SELECT * FROM users WHERE userid = $theid





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users