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 <? CREATE TABLE `user` ( `user_id` int(10) unsigned NOT NULL auto_increment, `username` varchar(150) NOT NULL default '', `password` varchar(150) NOT NULL default '', `email` varchar(255) NOT NULL default '', PRIMARY KEY (`user_id`) ) ; ?> PHP: Step 2 : As I have some data,example : <? INSERT INTO `user` VALUES (1, 'admin', '12345', 'admin@a.com'); INSERT INTO `user` VALUES (2, 'jacky', '1234578910', 'jacky@y.com'); INSERT INTO `user` VALUES (3, 'mizuki', 'abcd', 'mi@a.com'); ?> PHP: Now,how to list all of member in this table ?. Step 3: create listmember.php with code below <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> PHP: Now,you're done All information you can find here: http://www.t4vn.net/tutorials/showtutorials/How-to-create-Member-List-In-PHP.html Good lucks with your practice.
This post seems a bit spammy.. and the tutorial itself isn't that great. As mentioned above you're not validating the output (though assuming you're validating the input of the users shouldn't need to, but still good practice). The code itself is just sloppy.. the nesting isn't done properly, you're calling variables you haven't declared ($connected, which should be the mysql_connect() chunk) etc.