Getting error: Object of class mysqli_result could not be converted to string
<p>My code is very messy, but I am trying to make a forum on my website.</p>

<pre><code>&lt;?php 
    $conn = mysqli_connect("localhost", "root", "");
    if($conn-&gt;connect_error){
        die("Connection Failed");
    }
    mysqli_select_db($conn, 'forum');
    $get= "select * from forum";
    $runq = mysqli_query($conn, $get);
    while($fetch_value=mysqli_fetch_array($runq)){
        $get_usr_name=$fetch_value['username'];
        $get_body = $fetch_value['info'];
        }
        $result = $conn-&gt;query($get);
        if(is_null($get_body)){

        }
        else{
        echo "&lt;div id='inputform1'&gt;";
        for($row = 1; $row &lt; $result-&gt;num_rows; $row++){

            $dbhost = "localhost";
            $dbuser = "root";
            $dbpass = "";
            $dbname = "forum";
            $connection = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
            if(mysqli_connect_errno()){
                die("database connection failed: ") .
                    mysqli_connect_errno() .
                    " (" . mysqli_connect_errno() . ")";

            }
            $result1 = mysqli_query($connection, "select info from forum where id='$row';");
            $result = mysqli_query($connection, "select username from forum where id='$row';");
        echo "&lt;strong class=\"after_username\"&gt;by: {$result}&lt;/strong&gt;&lt;br&gt;&lt;br&gt;&lt;p id=\"bodyforum\"&gt;{$result1}&lt;br&gt;&lt;br&gt;&lt;/p&gt;";
        }
        echo "&lt;/div&gt;";

    }
    ?&gt;
</code></pre>

<p>I cannot seem to post the username and password; it keeps saying:</p>

<blockquote>
  <p>Object of class mysqli_result could not be converted to string</p>
</blockquote>

<p>I have tried many different "tactics" but none of them seem to work. Can someone help me?</p>