Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,288 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,400 people online right now. Registration is fast and FREE... Join Now!




Help with User supplied content site

 
Reply to this topicStart new topic

Help with User supplied content site, Kind of like a very small scale myspace...

Moshambi
1 Sep, 2008 - 10:02 PM
Post #1

D.I.C Head
**

Joined: 20 Nov, 2007
Posts: 73


My Contributions

I have a site where I want users to log in and when they do they will have their own page where they can upload their pics and maybe even a blog. I have got the log in part done already but I don't know where to even start for the User's Page...could someone maybe point me in a good direction to take? How would I even go about doing this?

Thanks in Advance,

Mosh
User is offlineProfile CardPM
+Quote Post

no2pencil
RE: Help With User Supplied Content Site
2 Sep, 2008 - 12:50 AM
Post #2

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 6,460



Thanked: 66 times
Dream Kudos: 2425
Expert In: Goofing Off

My Contributions
While your site may actually use PHP, this isn't a question about code. I'm going to move this to Site Check, because you are asking for help with the layout & design of the site. biggrin.gif icon_up.gif
User is online!Profile CardPM
+Quote Post

Moshambi
RE: Help With User Supplied Content Site
2 Sep, 2008 - 06:58 AM
Post #3

D.I.C Head
**

Joined: 20 Nov, 2007
Posts: 73


My Contributions
well that's my problem, I don't know how I should begin to code it... I tried to append ?=blahblahblah in the link but I don't know if thats how I should do it or if that's even secure.
User is offlineProfile CardPM
+Quote Post

Moshambi
RE: Help With User Supplied Content Site
2 Sep, 2008 - 07:00 PM
Post #4

D.I.C Head
**

Joined: 20 Nov, 2007
Posts: 73


My Contributions
sorry to sound desperate but I just really wanna get this project rolling so does anyone have any ideas?
User is offlineProfile CardPM
+Quote Post

BetaWar
RE: Help With User Supplied Content Site
2 Sep, 2008 - 08:10 PM
Post #5

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 2,021



Thanked: 81 times
Dream Kudos: 1175
My Contributions
For general viewing of a page ?blahblahbah works fine. When people are editing the page that also works fine, you just have to make sure that they are updating their own page and not someone else's. While it isn't secure, as long as they log out afterwards (when using a public computer) nobody else will be able to edit the page without knowing the other person's account information.

REALIZE - If you have a security flaw/hole in your login script people may get angry with you and not use the site (as they could have content changed or edited without their knowledge).
User is online!Profile CardPM
+Quote Post

Moshambi
RE: Help With User Supplied Content Site
2 Sep, 2008 - 09:07 PM
Post #6

D.I.C Head
**

Joined: 20 Nov, 2007
Posts: 73


My Contributions
ok thanks BetaWar that helped me understand it a little more...

All i want to do with the site is for the user to login and upload their own pictures, no editing like myspace or any of that jazz... then the pictures will just get added to a predefined template that I will make.

Now for the ?blahblahblah part, how do i do that in PHP, I tried doing it for a link but it would not show up in the URL...

Here is how I tried:

CODE

<?php

echo "<a href='blah.php?username='" . $username . "'>My Page</a>";

?>


I don't know if I am doing this correctly cause I am still learning this language...

Thanks for any help!
User is offlineProfile CardPM
+Quote Post

BetaWar
RE: Help With User Supplied Content Site
4 Sep, 2008 - 04:46 AM
Post #7

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 2,021



Thanked: 81 times
Dream Kudos: 1175
My Contributions
For a normal link (like to look at someone's page) that is fine. If you want to allow someone to edit their page do a general link like
?blahblahblah=editPage
and then check the user's cookie / session to allow them to edit their own page, and not someone else's.

File uploading is a fairly simple application, you can find it all over google.

Just make sure that you have read a couple of the tutorials on making safe sql statements and make sure that your forms use post when doing anything that may even possibly be private.
User is online!Profile CardPM
+Quote Post

Moshambi
RE: Help With User Supplied Content Site
5 Sep, 2008 - 11:06 AM
Post #8

D.I.C Head
**

Joined: 20 Nov, 2007
Posts: 73


My Contributions
Ok thank you again. I just though of another way that maybe i could do this...is there a way to create a new folder or .htm/.php file using php?

Cuz then i could just create a folder for the user and then inside of that place their page, so when they upload pics its all uploaded to their own folder. Please let me know if this is a bad idea?
User is offlineProfile CardPM
+Quote Post

Moshambi
RE: Help With User Supplied Content Site
10 Sep, 2008 - 12:48 PM
Post #9

D.I.C Head
**

Joined: 20 Nov, 2007
Posts: 73


My Contributions
bump...
User is offlineProfile CardPM
+Quote Post

gabehabe
RE: Help With User Supplied Content Site
10 Sep, 2008 - 03:38 PM
Post #10

Donkey DIC
Group Icon

Joined: 6 Feb, 2008
Posts: 5,526



Thanked: 96 times
Dream Kudos: 2650
Expert In: ruling the world.

My Contributions
I'll move this to Web Development, I think your question is more of "help me develop this" than "rate what I developed"


smile.gif
User is online!Profile CardPM
+Quote Post

Moshambi
RE: Help With User Supplied Content Site
11 Sep, 2008 - 08:05 AM
Post #11

D.I.C Head
**

Joined: 20 Nov, 2007
Posts: 73


My Contributions
thank you gabe that's why i originally postd it in php. now hopefully some one can help me figure this out smile.gif im still searching the net for answers too though...

Any help is appreciated!
User is offlineProfile CardPM
+Quote Post

Moshambi
RE: Help With User Supplied Content Site
11 Sep, 2008 - 09:43 PM
Post #12

D.I.C Head
**

Joined: 20 Nov, 2007
Posts: 73


My Contributions
Ok so I found out I was trying to do it the right way the whole time but I just had a bug in my code that was making it not work correctly. Now that I have found it out though I just have a security question...

If I use this:
CODE

if(isset($_POST['btnLogin']))
{
if ($count == 1) {
     $_SESSION['loggedIn'] = "true";
     $_SESSION['user'] = $username;
}
.....


with this:

CODE

echo "<a href='userpage.php?user=" . $username . "' /> My Page </a><br />";


Now say I log in as moshambi it will make the link look like this:


userpage.php?user=moshambi


Now on this page I can use this to load all the users images and such...I am just wondering if that is secure or not?

Thanks!
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 05:44AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month