techiefreak05 Posted August 22, 2006 Share Posted August 22, 2006 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 to comment https://forums.phpfreaks.com/topic/18279-user-page-editing/ Share on other sites More sharing options...
techiefreak05 Posted August 22, 2006 Author Share Posted August 22, 2006 any ideas, ANY at all ?? Link to comment https://forums.phpfreaks.com/topic/18279-user-page-editing/#findComment-78495 Share on other sites More sharing options...
tomfmason Posted August 22, 2006 Share Posted August 22, 2006 how are you displaying the users information. If it is a simple form then you can do something like this.[code=php:0]$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>';}[/code]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 Link to comment https://forums.phpfreaks.com/topic/18279-user-page-editing/#findComment-78497 Share on other sites More sharing options...
techiefreak05 Posted August 22, 2006 Author Share Posted August 22, 2006 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 to comment https://forums.phpfreaks.com/topic/18279-user-page-editing/#findComment-78498 Share on other sites More sharing options...
tomfmason Posted August 22, 2006 Share Posted August 22, 2006 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.[code]<?php $username = $_GET['username'];?><html><title><?php echo "$username"; ?>'s personal page</title><body><?php//now display there information?></body></html>[/code]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 [url=http://us2.php.net/manual/en/function.fread.php]fread[/url] and fwrite. This is going to be alot more complicated. Link to comment https://forums.phpfreaks.com/topic/18279-user-page-editing/#findComment-78502 Share on other sites More sharing options...
techiefreak05 Posted August 22, 2006 Author Share Posted August 22, 2006 what i use right now is fwrite, but its really basic ... Link to comment https://forums.phpfreaks.com/topic/18279-user-page-editing/#findComment-78504 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.