Jump to content


Photo

user page editing ....


  • Please log in to reply
5 replies to this topic

#1 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 22 August 2006 - 07:53 AM

hi, i have a site where you can sign up, send messages, etc. and i also have a profile system ... BUT to edit your profile you have to build it from the ground up!! your page is EMPTY, how would i make it so they can edit snippets, like myspace??? take a look:

http://zycoworld.flamelicker.com
Link shortener with advanced, detailed statistics:

http://tyny.us/

#2 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 22 August 2006 - 08:30 AM

any ideas, ANY at all ??
Link shortener with advanced, detailed statistics:

http://tyny.us/

#3 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 22 August 2006 - 08:46 AM

how are you displaying the users information. If it is a simple form then you can do something like this.

$sql = mysql_query("SELECT * FROM `yourtable` WHERE `username` = '$username'") or die(mysql_error());

while ($rw = mysql_fetch_assoc($sql)) {
     //now we display a form with the users info in text boxes and areas.
     echo '<form action="your_edit.php?user_id=' . $rw['user_id'] .' method="post">
                Email : <input type="text" name="email" value="' . $rw['email'] . '">
                Some info: <textarea cols="50" rows="10">' . $rw['some_info'] . '</textarea>
                <input type="submit" name="submit" value="Update Profile">
             </form>';
}

This is a realy simple way of doing this but it should give you an idea.

Also when you post a link you should make sure that it is a relivant link. Not just a link to your homepage.

Hope this helps,
Tom

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#4 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 22 August 2006 - 08:55 AM

Well .. i have that. thats to edit your personal user account, i want something that you can edit certain pieces of www.mydomain.com/user.html .... like a myspace profile. i have something that works, but you have to edit the page all your self, there is noe template or anything... and i want there to be little snippets that you can edit, to edit your "profile" or user page
Link shortener with advanced, detailed statistics:

http://tyny.us/

#5 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 22 August 2006 - 09:07 AM

I think that it would be better to use a database to store that and use a php page to display it.

So what I mean is something like this.
<?php
   $username = $_GET['username'];
?>
<html>
<title><?php echo "$username"; ?>'s personal page</title>
<body>
<?php
//now display there information
?>
</body>
</html>

Then you could use something like what I posted before.

If you realy want to use an html page then you will need to read up on fread and fwrite. This is going to be alot more complicated.

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#6 techiefreak05

techiefreak05
  • Members
  • PipPipPip
  • Advanced Member
  • 494 posts
  • LocationER, MN

Posted 22 August 2006 - 09:12 AM

what i use right now is fwrite, but its really basic ...
Link shortener with advanced, detailed statistics:

http://tyny.us/




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users