rallokkcaz Posted August 22, 2006 Share Posted August 22, 2006 Ive searched the web for like 2 days now and still no strace of how to make user profiles and let the user edit them.someone pleeze help!!it will be kind of you to help.thank you!! Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/ Share on other sites More sharing options...
trq Posted August 22, 2006 Share Posted August 22, 2006 Do you know how to insert and update a database? That would be a good place to start. Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78463 Share on other sites More sharing options...
rallokkcaz Posted August 22, 2006 Author Share Posted August 22, 2006 yes i do!! Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78464 Share on other sites More sharing options...
trq Posted August 22, 2006 Share Posted August 22, 2006 Then insert the users data into a database, make a page to view said data and another to edit it. What part exactly are you stuck on? Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78466 Share on other sites More sharing options...
rallokkcaz Posted August 22, 2006 Author Share Posted August 22, 2006 i don't know how to do that!! ive got no clue how to makea page like that. Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78467 Share on other sites More sharing options...
trq Posted August 22, 2006 Share Posted August 22, 2006 So you know how to insert and update data but not how to display it? An example...[code=php:0]<?php // coonnect to database if (isset($_GET['uname'])) { $sql = "SELECT uname,location,age FROM users WHERE uname='{$_GET['uname']}'"; if ($result = mysql_query($sql)) { $row = mysql_fetch_assoc($result); echo $row['uname']."</ br>"; echo $row['location']."</ br>"; echo $row['age']."</ br>"; } else { echo "query failed ".mysql_error(); } } else { echo "no user selected"; }?>[/code]If this file was called profiles.php and you called it using http://yoursite/profiles.php?uname=bob it would display bob's name location and age. Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78470 Share on other sites More sharing options...
rallokkcaz Posted August 22, 2006 Author Share Posted August 22, 2006 ahhh. :o ;) that makes sense thanks for that but how do you allow them to edit itand make the page look a little more professinal. Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78472 Share on other sites More sharing options...
rallokkcaz Posted August 22, 2006 Author Share Posted August 22, 2006 and also if i wanted to make this page instantly when the user creates his account how would i do that? Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78474 Share on other sites More sharing options...
trq Posted August 22, 2006 Share Posted August 22, 2006 [quote]but how do you allow them to edit it[/quote]Make a simular page (called editprofile.php or something) but instead of just displaying the data, place it in a form ready to be submitted to an UPDATE sql statement.[quote]make the page look a little more professinal.[/quote]Use html to markup your data. What I posted was just a very simple example to get you started, Im not going to write a finished product. Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78475 Share on other sites More sharing options...
trq Posted August 22, 2006 Share Posted August 22, 2006 [quote]and also if i wanted to make this pageinstantly when the user creates his account how would i do that?[/quote]That makes no sense. If this page exists, then as soon as a user submits there details to the database you can use this page to display there profile. Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78476 Share on other sites More sharing options...
rallokkcaz Posted August 22, 2006 Author Share Posted August 22, 2006 srry bout that!! dumb question!But how would you make an update sql statement.srry for the dumb questions. :-\ Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78477 Share on other sites More sharing options...
trq Posted August 22, 2006 Share Posted August 22, 2006 I thought you said you knew how to update a database? Maybe a read of [url=http://www.hudzilla.org/phpbook/read.php/9_0_0]this[/url] would help you. Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78480 Share on other sites More sharing options...
rallokkcaz Posted August 22, 2006 Author Share Posted August 22, 2006 ok ive got one question how could i make it so the user could edit it?and do you have an msn or AIM screen name so we could talk a little easier Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78482 Share on other sites More sharing options...
trq Posted August 22, 2006 Share Posted August 22, 2006 [quote]how could i make it so the user could edit it?[/quote]I answered that question a few posts up. And no, I dont use any instant messenger. Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78484 Share on other sites More sharing options...
rallokkcaz Posted August 22, 2006 Author Share Posted August 22, 2006 could you show an example? ??? ok im so srry for the trouble dudebut im a bit of a rush now Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78485 Share on other sites More sharing options...
Yesideez Posted August 22, 2006 Share Posted August 22, 2006 Do a Google search for handling forms in HTML, there are loads of tutorials available or even visit scripts archives and download some examples, they'll show you exactly how its done.Then its just a case of collecting the data in a PHP script using $_POST and inserting it all into the database.Its like a register page when a user wants to sign up for whatever you're making. Once you have their registration details and its all correct you can insert it into a user's table in the database. Then whenever you use another script to view their profile all you're doing is extracting the data and displaying it in the browser. Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78487 Share on other sites More sharing options...
Yesideez Posted August 22, 2006 Share Posted August 22, 2006 If you want examples, you're more than welcome to download an MMPORG game I wrote last year:http://www.pictureinthesky.net/lealta.zip (1.5MB)Have a look at that and do what you want with it - I no longer use it. Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78488 Share on other sites More sharing options...
CircularStopSign Posted August 22, 2006 Share Posted August 22, 2006 i think hes talking about a publically viewed profile... for example myspace profiles.. which is what i'm trying to figure out. i cant speak for him... but maybe he means how do you make it so that each person has their own "www.mywebsite.com/*******" with the * as the digits of their user ID? Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78857 Share on other sites More sharing options...
rallokkcaz Posted August 23, 2006 Author Share Posted August 23, 2006 yes thanks for putting it in better words Link to comment https://forums.phpfreaks.com/topic/18277-help-to-create-user-profiles/#findComment-78939 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.