May 12, 2008

Creating Profiles In Php/mysql ?

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > PHP Programming

free web hosting

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

Reply

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

Reply

jmb2006
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

 

 

 


Reply

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

Reply

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.

Reply

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.

Reply

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!

Reply

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

Reply



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*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Similar Topics

Keywords : creating profiles php mysql

  1. Best Php And Mysql Editor For Noobs - anyone any php or mysql editor that is good for noob (5)
  2. Php And Mysql Programming - anyone knows a code for mysql and php (2)
    hi everyone! I am making a program using php and mysql...I am a noob on this so i need your
    help guys...I want to make a simple program that will some values and then store them on a database
    and then retrieve them...uhmm let me give an example out put of what i need. This is the example
    say..: Enter First Name: Enter Last Name:
    Enter Age: Enter Address: ..those
    are the data needed for input values...my question now is how can I make a database...
  3. Can You Add Images Into A Mysql Database? - Using Php? (18)
    I'm learning php in class right now, but I'm still not that good at it, what I'm
    wondering is when I write the php so that it can connect with a database, can I at the same time
    have it that it is able to display back images that I choose. Like, I want a search feature, where
    you can search for a keyword, and it will bring back a list of all the possible entries with that
    keyword, but each of these entries will have a photo associated with it. Now, do I put these image
    files directly into the database, or do I write the code to link them from my files to th...
  4. Creating Something With Co-ordinates With Php. - Something like you see in those web-based php games, like a map or som (12)
    Well, i was just wondering if something simple and basic could be made (like a small map where you
    could move around on, like you click up, and your position moves up and reports it to the
    database..etc) with co-ordinates in php . Taking the x-axis and the y-axis into consideration.
    Things like maps which online games have such as web-based space games or legacy-game.net. Thanks
    for any feedback, ~Aldo...
  5. Best Sites For Learning Php-mysql - (4)
    Hi I was reminded of this earlier by a post in a topic, meant to post it but forgot and the topic on
    php books reminded me. Well anyway there is tyhschools for learning php (unless someone else knows
    a better 1) but I wan't to know what is the best site for using php with mysql (using
    phpmyadmin) also whats the difference between postgresql and mysql? though I must admit the
    postgresql version of phpmyadmin whatever it's called looks better (visually)!...
  6. Tools Needed! - PHP & MySQL (6)
    Hello, everyone! I need some tools for those two things to test PHP scripts coming together with
    database on my laptop, instead checking them on a web-server which takes time....
  7. Increment A Mysql Column - how to increment a MySQL column one unit (6)
    Hi, I have a column in a MySQL table which contains a counter of the views of the object described
    by this table. I would like to increment this value by one everytime the object is viewed. Obviously
    came into my mind the possibility of retrieving the value of this field, store it in a variable
    increment this value by one and perform an UPDATE query again with this new value. My question is if
    there is a MySQL option to update the field with its actual value plus an unit increment. I hope you
    understand the issue....
  8. Php + Mysql Question! - While inserting data into MySQL, how can I know if the data I'm in (4)
    Basically, I want to know if the Data I'm inserting through a Form is already there or not. Sort
    of a Username registration page. I have this, but it doesn't appear to work... CODE
    $result = mysql_query("SELECT * FROM users WHERE
    username='$username'"); if($result == 1)     {     echo
    '<h1>ERROR!</h1>The username you have chosen already exists!';     }
    ...
  9. Mysql Won't Update - (2)
    Ok, so I'm making some arcade administration software so I don't have to add games the hard
    way, well anyway, one of the features I have is that on the homepage is a featured author and as
    such I just have it so it updates one line in the mySQL. Well, the page with the form passes on the
    varibles fine and the updating page recieves them because I echoed everything, then I build the
    query and I even echo the query and it comes out exactly how I want it to, but for some reason, the
    database itself won't update even though all the varibles are there. Here's...
  10. [php/mysql]id Trouble [resolved] - (3)
    session_start(); include "database.php"; if (!$_SESSION || $_SESSION { // User
    not logged in, redirect to login page Header("Location: main.php"); } $result =
    mysql_query("select * from users order by id asc"); while($r=mysql_fetch_array($result))
    { $username=$r ; $info=$r ; $msn=$r ; $email=$r ;
    $id=$r ; $password=$r ; $userlevel=$r ; echo "
    user ID User Level U...
  11. [mysql/php]need Som Basic Help - (13)
    QUOTE session_start(); include "database.php"; include "edit.inc.php"; if (!$_SESSION
    ) { // User not logged in, redirect to login page Header("Location: main.php"); }
    if(isset($_POST )){ $email = $_POST ; $msn = $_POST ; $info =
    $_POST ; $updateemail = "UPDATE users SET email = '$email', msn =
    '$msn', info = '$info' WHERE username = '$username'";
    mysql_query($updateemail) or die("culd not edit your info"); echo "info updated"; } //
    Display log...
  12. Php Search Engine Script For Mysql Database - (11)
    A search engine is provided to facilitate the user with undemanding and clear-cut search options.
    The search facility includes simple search, search by title, search by word/phrase, ect… Thus, the
    user is at a safe distance from the risk of selecting files/folders ambiguously. In addition, a
    history of recent searches can be preserved for future perusal. Now
    day’s visitors have a large option for his needs on internet and so visitors are not vesting their
    time by following the dead links on your site. So a search engine is essential for your...
  13. [mysql]get Id Of Loged In User? - (7)
    how to get the id number of the loged in user? my db is id. username. password. i have tryed a
    few things.. but i never seem to get it right /ohmy.gif" style="vertical-align:middle" emoid=":o"
    border="0" alt="ohmy.gif" />...
  14. 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 <pictures>     <image location="nameofpicture1.jpg"
    desc="" />     <image location="nameofpicture2.jpg" desc="" /&#...
  15. Problem On Mysql "order By" - (5)
    Can someone please help...? I have a problem with using "ORDER BY" in mysql... CODE SELECT *
    FROM `foo` WHERE b='abc' ORDER BY 'number' ASC i want to sort the table out by
    the value in "number" which is a number.. but it came out to be sort by like this way...
    1->10->2->20 it only sort out the front digit.... but what i want is it will sort by how great the
    number is like this... 1->2->3........->10....->20 sorry my english isn't good enough...to
    describe my problem properly... hope you can understand and help me on this.....thx...
  16. Some Mysql Basics - (4)
    Greetings this tutorial will show you some mysql basics.. MySQL is one of the most used database. a
    simple config file at the top add this CODE <?php ?> after <?php add
    $username= "root"; // Username that has access to your database $password=
    ""; //Password that has access to your database $host = "localhost"; // The
    host where the database is (mostly this is localhost) $db = "databasename"; //
    The name of the database where you want to work with //connect to the database mysql_connect(...
  17. 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. ...
  18. The Artists Tutorials :mysql Basic Commands - The Artists is an online programming unit and gfx designing clan. (0)
    Let's Talk about basic mysql commands used in php. I will now show you a list of the most common
    MySQL FUNCTIONS : QUOTE mysql_connect(MySQL server name,username,password) - opens a connection
    to a MySQL server. mysql_select_db(database name,connection id) - selects a database residing on
    the MySQL server. The database name parameter referes to an active database on the MySQL server that
    was opened with the mysql_connect function. The connection identifier is a reference to the current
    MySQL connection. mysql_query(sql query) - sends a query to the currently ac...
  19. Problem With A Mysql Join - Problem with a mysql join (2)
    Hello I am trying to write a script whereby I can pull an image out of one database table and
    display it in relation to its category_id in another table. I am using a my_sql join function that
    is joining the tables correctly, however it only shows the one same image from the top field of
    those combined rows on every single page. I need it display the image according to its category_id
    for that particular page. I am thinking I need to set variables to represent those specific rows but
    I'm not sure how to do that. Here is my code CODE { $result = mysql_que...
  20. Getting Php 5 To Work With Mysql - getting PHP 5 to work with MySQL (0)
    Just thought this would be of extreme help to those who are planning to migrate to php5 and still
    continue using MySQL same way as before:.... to get mysql work with the php 5 copy
    /dll/libmySQL.dll to the directory where php 5 resides and copy the /extensions/php_mysql.dll to the
    directory where php.exe resides.(if you can't find the two above files probably you are using an
    old release of php 5.you should check for latest at :http://snaps.php.net/) in additon uncomment
    extension line in php.ini and add the following code to a gnereal database file(dbcon.php) in m...
  21. Php And Mysql Applications - (3)
    Ok I have started useing PHP and MySQL recently and I am wondering how I go about createing an
    application. I looked for tutorials and guids at w3schools.com but couldnt find what i was looking
    for. All I really need is a list of a few steps to take to get a general idea on were to start when
    makeing an application. I would appreciate any help you may have to offer....
  22. Php, Mysql, Apache - (4)
    ok, i am hosting a smf (simple machines forum) and in order to do so, i need apache, mysql and php
    installed. so i got apachefriends xampp. it works, but idk where to go from there. am i ready to
    just host and stuff. or do i need to do a couple more things. basically what i need is a guide on
    how to set up a php website. or just confirmation that all i have to do is load the files onto the
    website, then im ready to go. thank you...
  23. Simple Mysql Query Limiting - (9)
    Simple MySQL Query Limiting CODE <?php // If mypage?limit=blah is not defined returs 5
    if ( $_GET['limit'] == NULL ) {     $limit = 5; } // Else else {
        $limit = $_GET['limit']; } $query = mysql_query("SELECT
    * FROM members LIMIT '$limit'") or die(mysql_error()); while
    ($sql = mysql_fetch_array ($query) ) {     echo
    $sql['mem_name'] . '<br>'; } ?> Have fun.....
  24. Mysql Query - (2)
    theres a bug somewhere in this query and i can't seem to find it. does anyone else see it?
    CODE $query = "insert into templates
    (tuid,tname,tdescription,template,archivedefault) values (1,'Sample Archive
    Template','A sample archive template that only shows the name of the article with a link to
    the default article viewer.','<a
    href='viewarticle1.php?aid=[id]'>[articletitle]</a>',FALSE&#
    41;"; ...
  25. Putting Data Of 2 Pages In Mysql At Once - (1)
    suppose i have a page, page.php?part=1 there i have some text fields. user will give input, but
    after taking input, it will not put the data in mysql .. but it will take to the next step..
    page.php?part=2 (if any field is left blank, it will not go to next page.. ) . and there also some
    fields.. after the user has filled that form also, then it will insert all data (from part1 and
    part 2) in mysql. i want to ask, how i can collect data from 2 pages and put in mysql at once....
  26. Editing Information In A Mysql Database And Deleting Rows - (5)
    I need help with a couple of things. First, I need to know how to retrieve information from a mysql
    database and edit it then re add it to the database. I also would like to know how to easily delete
    a mysql row. And I want this done without going to phpMyAdmin. Thanks for the help!...
  27. How To Delete A Row In Mysql. - A very simple help required (4)
    Im using the following code, for very simple work.. it simply gets and print the comments which are
    stored in the database. Now it will show like comment 1. comment 2. comment 3. etc etc i want to
    add 'delete' option that i can delete any comment. it displays like comment 1.
    Delete comment 2. Delete comment 3. Delete
    So that when i click on delete, it simply deletes the comment and print the remaining comments. Its
    very simple. i hope you understand. QUOTE $result = mysql_query("sele...
  28. Importing .csv Into Mysql Database - NEED HELP! (6)
    I need help importing a .csv contents into a Mysql database. I have this. But its not working.
    CODE <?php connection = mysql_connect("******", "**********",
    "********") or die ("Unable to connect to server"); $db =
    mysql_select_db("b9_259782_CC", $connection) or die ("Unable to select
    database"); fopen ('csvranks.csv', 'r');
    mysql_query("INSERT INTO test_table (id, name, guild, level, exp) ?> What
    am I doing wrong? The mys...
  29. Script Not Working :s - mysql errors (5)
    process_login.php: Process the login. $host = "localhost";// the host that u are connecting
    $username = "root";// user name $password = ""; // passworld $basedatos =
    "forum"; //Dont change this1. $db = mysql_connect($host, $username, $password);
    mysql_select_db($basedatos, $db); $user= $_REQUEST ; $pass=
    md5($_REQUEST ); $query1= "SELECT * FROM smf_members WHERE
    memberName='$user'"; $mkquery= mysql_query($query1,$db); $row1=
    mysql_fetch_assoc($mkqu...
  30. Incrementing Mysql Integer - int comes out as string? (7)
    I am attempting to perform mathematical operations on a number extracted from a MySQL database. The
    integer is stored as an integer in the database, and nothing I am doing to it in the PHP script
    would transform it into a floating-point value. I don't even want to worry about sticking it
    back in just yet: CODE // the value I want to increase here is logins... $query1 =
    "SELECT * FROM users WHERE id='$id'"; $result1 =
    mysql_query($query1) or die(mysql_error()); $row1 =
    mysql_fetch_array($...



Looking for creating, profiles, php, mysql

Searching Video's for creating, profiles, php, mysql
Best Php And
Mysql Editor
For Noobs
anyone any
php or mysql
editor that
is good for
noob
Php And
Mysql
Programming
anyone knows
a code for
mysql and
php
Can You Add
Images Into
A Mysql
Database?
Using Php?
Creating
Something
With
Co-ordinates
With Php.
Something
like you see
in those
web-based
php games,
like a map
or som
Best Sites
For Learning
Php-mysql
Tools
Needed!
PHP &
MySQL
Increment A
Mysql Column
how to
increment a
MySQL column
one unit
Php + Mysql
Question!
; While
inserting
data into
MySQL, how
can I know
if the data
I'm in
Mysql
Won't
Update
[php/mysql]i
d Trouble
[resolved]
[mysql/php]n
eed Som
Basic Help
Php Search
Engine
Script For
Mysql
Database
[mysql]get
Id Of Loged
In User?
Php And
Flash Image
Gallery Need
some help in
creating or
editing an
xml file
while
viewing some
o
Problem On
Mysql
"order
By"
Some Mysql
Basics
Creating A
Login Box
That Links
To My Phpbb
Forum Have
my phpBB
Forum
Intergrated
with my
Website
The Artists
Tutorials
:mysql Basic
Commands The
Artists is
an online
programming
unit and gfx
designing
clan.
Problem With
A Mysql Join
Problem with
a mysql join
Getting Php
5 To Work
With Mysql
getting PHP
5 to work
with MySQL
Php And
Mysql
Applications
Php, Mysql,
Apache
Simple Mysql
Query
Limiting
Mysql Query
Putting Data
Of 2 Pages
In Mysql At
Once
Editing
Information
In A Mysql
Database And
Deleting
Rows
How To
Delete A Row
In Mysql. A
very simple
help
required
Importing
.csv Into
Mysql
Database
NEED
HELP!
Script Not
Working :s
mysql errors
Incrementing
Mysql
Integer int
comes out as
string?
advertisement



Creating Profiles In Php/mysql ?



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE