php - Fetch 1 column value from mysql database -


i have following column in database: http://i.stack.imgur.com/omyjc.png

how can make read column , write example.com site?:

echo "your website: " . $website; 

note i'm starter php.

as new php, first learn database connectivity through php check out : http://php.net/manual/en/mysqli.quickstart.connections.php

after successful database connection, try how query on database through php check out : http://php.net/manual/en/mysqli.quickstart.statements.php

sample code :

    $mysqli = new mysqli("example.com", "user", "password", "database");     if ($mysqli->connect_errno) {         echo "failed connect mysql: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;     }      $mysqli->real_query("select website my_table");     $res = $mysqli->use_result();      while ($row = $res->fetch_assoc()) {         echo " website = " . $row['website'] . "\n";     } 

Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -