srinivasa Posted April 3, 2010 Report Share Posted April 3, 2010 <?php //db configuration include "config.php"; if(!($db = @mysql_connect($server, $db_user, $db_pass))) //connect to database die("Couldn't connect to the database."); if(!@mysql_select_db($db_name, $db)) //select database die("Database doesn't exist!"); $sql = "SELECT * FROM users"; if(($result = @mysql_query($sql, $db)) == 0) { echo "n<hr />Database error: <span>".mysql_error()."</span><br/>n"; die("MySQL Said: " . mysql_error()); } $user = array(); ?> <table> <tr> <td><b>Name</b></td><td><b>Lastname</b></td> </tr> <?php while($tmp = mysql_fetch_assoc($result)) { ?> <tr> <td><?php echo $tmp["Name"];?></td><td><?php echo $tmp["Lastname"];?></td> </tr> <?php } ?> plzzzzzzzzzzzzzzzzzzzzzzzz, reply soon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.