Old 02-17-2005   #1 (permalink)
Registered User
 
Join Date: Feb 2005
Posts: 2

Question Help Tutorials: Membership

Hello all, sorry for my bad english!

Well, i just made the membership tutorials, all is working and very nice tutorials !

But how can i call like the user username, or other info i added like like the phone number.. in my database in the member page ?

I tried all my best to find a way, but i`m new in php//mysql and nothing have worked ! So if you can help me a little bit !

Thnx you very much !!
ParanoID87 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 02-17-2005   #2 (permalink)
Moderator
 
ConceptualMind's Avatar
 
Join Date: Oct 2003
Location: BioRUST Design Community
Posts: 2,652

PM scrowler if you want an immediate response. He's the creator of the membership tutorial.

Unfortunately I don't know php well so I don't help you. If scrowler isn't available, PM Order. He's another php guru.
__________________
ConceptualMind
ConceptualMind is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 02-18-2005   #3 (permalink)
Registered User
 
Join Date: Feb 2005
Posts: 2

oki thnx you !
ParanoID87 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 02-18-2005   #4 (permalink)
code anyone?
 
scrowler's Avatar
 
Join Date: Feb 2004
Location: New Zealand
Posts: 590

Send a message via MSN to scrowler Send a message via Skype™ to scrowler
if you have a column in your mysql database/table that is in the same table as the username password etc, you can use the following code to retrieve the data in the column named "PhoneNumber"

Code:
<?
# assume already connected to mysql server/database
$query = mysql_query("SELECT * FROM YourTableName") or die(mysql_error());
while($row = mysql_fetch_array($query)){

// process your data, each row will be in variable: $row['PhoneNumber'];

}
?>
every time it loops through a row in the table, $row['PhoneNumber'] will be different. you can either echo is each time to output every phone number, it only retrieve one... etc.

hope this helps
__________________
BioRUST Tutorials - the birthplace
scrowler is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 02-22-2005   #5 (permalink)
Invicible Snake
 
ParaSnake's Avatar
 
Join Date: Sep 2004
Location: Ho Chi Minh City,Vietnam
Posts: 668

Send a message via MSN to ParaSnake Send a message via Yahoo to ParaSnake
Let me make scrowler`s script more useful for you then:
PHP Code:
<?
//connect to the database
//for example you have 3 fields are username,phone,password in ur table name member
//heres the query
$query mysql_query("SELECT * FROM member") or die(mysql_error());
//use this to determine if there is no data in table member yet.
if(mysql_num_rows($query)==0) {  
  echo 
"Problem,theres no data.";
  exit();
}
//use while loop to gain data
while($row mysql_fetch_array($query)){
         echo 
$row[username]."--".$row[phone];
         echo 
"<BR>";
}
//final result will display like
//name1--phone1
//name2--phone2
//ect...
?>
Hope you get it man,i`m bad at English to
__________________
ParaSnake is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT +1. The time now is 12:43 PM.
Content Relevant URLs by vBSEO 3.2.0

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT