Reply
How to create Member List In PHP & MYSQL ?
Old 05-11-2007, 01:06 PM How to create Member List In PHP & MYSQL ?
Average Talker

Posts: 28
In this tutorials.I teach you "how to create member list in PHP with mysql.This Source code has been writen form T4VN Team. so, if you want to develop it, please contact us. Thanks for your interested in this code.

Step 1 : Create database with information
PHP Code:
<? 
CREATE TABLE 
`user` ( 
  `
user_idint(10unsigned NOT NULL auto_increment
  `
usernamevarchar(150NOT NULL default ''
  `
passwordvarchar(150NOT NULL default ''
  `
emailvarchar(255NOT NULL default ''
  
PRIMARY KEY (`user_id`) 
)  ; 
?>
Step 2 : As I have some data,example :

PHP Code:
<? 
INSERT INTO 
`userVALUES (1'admin''12345''admin@a.com'); 
INSERT INTO `userVALUES (2'jacky''1234578910''jacky@y.com'); 
INSERT INTO `userVALUES (3'mizuki''abcd''mi@a.com'); 
?>
Now,how to list all of member in this table ?.
Step 3: create listmember.php with code below


PHP Code:
<HTML> 
<HEAD> 
<meta http-equiv="Content-Language" content="en-us"> 
<TITLE>This is Example</TITLE></HEAD> 
<body> 
            <TABLE style="BORDER-COLLAPSE: collapse" borderColor=#77a7ad  
            cellSpacing=1 cellPadding=1 width="100%" bgColor=#ffffff border=1> 
        <tr> 
            <td width="37" align="center" ><font face="Tahoma" size="2"><b>STT</b></font></td> 
            <td align="center" ><font face="Tahoma" size="2"><b>Username</b></font></td> 
            <td align="center" ><font face="Tahoma" size="2"><b>Email</b></font></td> 
                    </tr> 
<? 
$ds
="select * from user order by user_id "
$rs=mysql_query($ds,$connect); 
if(
mysql_num_rows($rs)!= ""

    
$stt=0
    while(
$row=mysql_fetch_array($rs)) 
    { 
        
$stt++; 
?> 
        <tr> 
            <td width="37" align="center"><font face="Tahoma" size="2"><?=$stt?></font></td> 
            <td align="center"><font face="Tahoma" size="2"><?=$row["dn_username"]?></font></td> 
            <td align="center"><font face="Tahoma" size="2"><?=$row["dn_email"]?></font></td> 


        </tr> 
        <? 
    


?> 
    </table> 
</body> 
</html>
Now,you're done

All information you can find here:
http://www.t4vn.net/tutorials/showtu...st-In-PHP.html

Good lucks with your practice.


__________________
T4VN.NET ==>PHP Tutorials,PHP Example,PHP Script,Online Project,PHP News,....and more,helper coding...
Dog Training Site ==>Dog Information
t4vn.net is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Reply     « Reply to How to create Member List In PHP & MYSQL ?
 

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11197 seconds with 12 queries