Nov 21, 2009

Creating Profiles In Php/mysql ?

free web hosting
Open Discussion > MODERATED AREA > Computers > Programming Languages > PHP Programming

Creating Profiles In Php/mysql ?

itssami
i've started to learn php..im familiar to basics of php and mysql now.Now for example i want that some user can register to my website , and after that he can Login and log out , and he can see his profile.is there any tutorial about this ? or any helping url .. or any helping answer please smile.gif

Comment/Reply (w/o sign-up)

tuddy
Have you looked under the Computers>>Software>>Programming...>>>PHP yet?? there is most likely something in there.

Otherwise, www.phpfreaks.com or www.google.com

Comment/Reply (w/o sign-up)

james_666
hey check out http://www.phpfreaks.com/ there is a tutorial on user/membership on there. As for users + profiles, you could add a table to your database called UserProfs or something else with these columns.
Username,
Email Address,
Real Name
and more then just create a php file like this:
CODE
<?php
if (isset($user)) {
$db_server = "localhost";
$db_database = "members";
$db_user = "user";
$db_pass = "pass";
mysql_connect($db_server, $db_user, $db_pass) or die("Could not connect to database server.");
mysql_select_db($db_database) or die("Could not select database.");
$query = "SELECT * FROM $db_database WHERE username=$user";
$results = mysql_query($query);
$num = mysql_numrows($results);
if ($num > 0) {
$email = mysql_result($results, 0, "Email Address");
$realname = mysql_result($results, 0, "Real Name");
print "<b>Username:</b> $user<br>";
print "<b>Email:</b> $email<br>";
print "<b>Real Name:</b> $realname<br>";
$a++;
}
}
?>


just learn php/mysql there are plenty of tutorials out there and its not that hard to do, here is a good tutorial that helped me: http://www.freewebmasterhelp.com/tutorials/phpmysql

 

 

 


Comment/Reply (w/o sign-up)

farsiscript
dear itssami
You can find many php tutorial at www.pixel2life.com
You must search at membership tutorial at php base
like this : http://www.pixel2life.com/tutorials/count/...membership_2_0/

have good time

Comment/Reply (w/o sign-up)

ewcreators
I'm going to go ahead and jump in here, its quite easy actually.
As long as you understand how to use $_SESSION,$_GET,$_POST,$_REQUEST(optional, not necessary)
but for profiles, concentrate on $_GET. Jmb was partially correct, but instead of doing that, why not just directly take the details from the user database rather than creating one more with duplicate fields and values?

Follow this,itssame :

For example, your database has a table called 'users' and its fields are username,rank,email.



Code :
CODE
<?php
//call in your connection file
require('connection2.php');

//Select from the database, the row which has the username of $_GET[profile] as give in the url. Example : url.com?a=account&s=session&profile=Test
$query=mysql_query("SELECT * FROM users WHERE username='$_GET[profile]'");

//Check the number of rows that are there in the database with the username of $_GET[profile], in this case Test is the account.
$count_rows=mysql_num_rows($query);

if ($count_rows >= 1) {
$r=mysql_fetch_array($query);
//above, we set $r to all the fields main display variable .
echo "Username  : $r[username] \n";
echo "Email : $r[email] \n";
echo "Rank : $r[rank] \n";

}
else {
echo "No records of user.";
}

mysql_close(connection_variable);
?>


Thats the most basic script. You can modify it to your needs.

Comment/Reply (w/o sign-up)

Saint_Michael
I set in a reminder that if you plan to use a user registration script tutorial, that you also find security tutorials as well because I only can imagine how quickly someone could get into your hosting account and then do their damage. Of course if your trying to learn php then it is well worth the effort to get a understanding of how it works, but if you going to use them you want to look for software that has some sort of registration script already set up with it that comes with some sort of security.

Comment/Reply (w/o sign-up)

alex1985
Well, if there is a big difference between Membership System and Profiles System, because I wanna implement one and there are many tutorials online concerning both systems!

Comment/Reply (w/o sign-up)

alex1985
Waiting still for the reply. Who knows how I can built profile or membership system like the one in PHP Fusion, for instance.

Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords : creating, profiles, php, mysql

  1. Creating Something With Co-ordinates With Php.
    Something like you see in those web-based php games, like a map or som (12)
  2. Php And Flash Image Gallery
    Need some help in creating or editing an xml file while viewing some o (5)
    Hello there and thanks for the helping hand you are offering. PHP newbie here! /ph34r.gif"
    style="vertical-align:middle" emoid=":ph34r:" border="0" alt="ph34r.gif" /> So here is my problem:
    On my website I have a flash image gallery.The way the gallery works is by uploading pictures in a
    folder and editing? an xml file.(pics.xml) where it adds the following code when you upload a
    picture: CODE           etc... Now I have users that upload products they sell on the
    website or they advertise their business(hotels, jewellers, car resellers,...) So for eve....
  3. Creating A Login Box That Links To My Phpbb Forum
    Have my phpBB Forum Intergrated with my Website (4)
    Can someone please give me a code that I can use to put a login box on my website, that will login a
    user into my phpBB Forum? Sort of like Having my phpBB Forum Intergrated with my Website? Thank you
    so much if you can! /angel.gif" style="vertical-align:middle" emoid=":angel:" border="0"
    alt="angel.gif" /> Ex. ....
  4. Evilboard (forum Software) - Multiple Categorys - Don't Work :(
    I am creating a forum and i can't fix more then 1 category. (6)
    I am at the moment trying to program my own forum, but i need more then a single category, here is
    my source: CODE function cat () { include("functions/functions.php"); echo '  
    Forum ';      global $catid;   $db = new db;   $db->connect();   $connect =
    $db->query("SELECT * FROM eb_forum WHERE catecory = '1'");   # START GET CATEGORYS #
      $catz = array();   while ( $cat = mysql_fetch_object( $connect ) ) {   /*echo "         
    {$cat->name}      Topics:      Replies:      ";*/     $catz .= "        {$cat->name}
      ....
  5. Creating Communities/groups In Php ?
    (2)
    for example , if on my website, i have made some kind of members area.that the users can join.i want
    to learn that , they can create the groups...and then others can join their groups... for example ,
    some one creates the group "fun" , and the others existing users can join that ... etc ? can some
    one give me some idea about it ?? if possible some kind of tutorial/Script/ url link etc ?? thanks......
  6. Can My Forum And Website Use The Same Profiles?
    (3)
    I've been programming a 'rate-em' site from scratch. You know like Hot Or Not. YEs,..
    yet another rate-em website. Anyway, i'ts done and before I launch it I need to add a forum as
    the finishing touch, but all the forum softeware out there seems so hard to integrate. I'm
    trying to make it so that when a user logs into my rate-em website they are also logged into 'my
    forum'. i.e. i want my forum and web site to use the same profile data. If anyone knows of a
    forum program made for this objective please let me know. I'm in over my head, a....
  7. Php Programmers, How Long To Finish Your Scripts?
    time spent on creating php scripts (23)
    Hello. I am currently working on kShoutBox 0.5 which has many new features. Now I realize that
    it's really really and i mean really difficult to create a PHP script because it really do takes
    your time. Example when I don't know what to do or what function to use, i check out the php
    manual, and you know, i use the old tradition "Trial and Error".....

    1. Looking for creating, profiles, php, mysql

Searching Video's for creating, profiles, php, mysql
See Also,
advertisement


Creating Profiles In Php/mysql ?

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com