Getting details from MySQL DB with PHP

26 Mar

How to print details from MySQL with PHP :

Note : Replace red marked details:

mysql_connect("hostname", "username", "password") && mysql_select_db("dbname") or die;
$details = mysql_query("select * from users");
while ($detail = mysql_fetch_assoc($details))
$name = $detail['name'];
echo "$name";

One Response to “Getting details from MySQL DB with PHP”

  1. Jignesh Patel March 28, 2013 at 6:08 am #

    Reblogged this on RJ Solusoft.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: