|
|
|
|
![]() ![]() |
Mar 21 2006, 08:01 AM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 258 Joined: 13-November 05 Member No.: 14,234 |
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
|
|
|
|
Mar 21 2006, 09:01 AM
Post
#2
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 570 Joined: 5-July 05 From: Ballarat Member No.: 9,042 |
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 |
|
|
|
Mar 21 2006, 09:34 AM
Post
#3
|
|
|
Member [Level 3] ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 96 Joined: 7-July 05 Member No.: 9,135 |
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 |
|
|
|
Sep 30 2006, 03:44 PM
Post
#4
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 357 Joined: 8-April 06 Member No.: 21,487 |
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 This post has been edited by farsiscript: Sep 30 2006, 03:46 PM |
|
|
|
Apr 1 2008, 05:01 PM
Post
#5
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 59 Joined: 28-August 07 Member No.: 48,983 |
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. This post has been edited by ewcreators: Apr 3 2008, 05:39 PM |
|
|
|
Apr 3 2008, 03:09 AM
Post
#6
|
|
|
$p4m 0n j00 $h4m3 m3 0nc3 $p4m 0n m3 $h4m3 m3 7\/\/1c3 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 6,295 Joined: 21-September 04 From: 9r33|\| 399$ 4|\|D 5P4/\/\ Member No.: 1,218 ![]() |
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.
|
|
|
|
Apr 17 2008, 04:06 PM
Post
#7
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 387 Joined: 9-February 08 Member No.: 57,615 |
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!
|
|
|
|
Apr 23 2008, 11:02 AM
Post
#8
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 387 Joined: 9-February 08 Member No.: 57,615 |
Waiting still for the reply. Who knows how I can built profile or membership system like the one in PHP Fusion, for instance.
|
|
|
|
![]() ![]() |
Similar Topics