将数据库结果输出到文本框

When I connect to my database and try to output it's result in to a text box, it wouldn't print anything that would comes after a space. For example, as shown in the image bellow, it only prints out Brown and wouldn't show the rest. (This only happens if there is a space). However, this problem doesn't happen if I print the result without using a text box. Please let me know if there is anything I can do make it work with a textbox.

<?php

$connInfo = array(
        'Database' => 'database_name',
        'UID' => 'user_ID',
        'PWD' => 'my_password',
        'ReturnDatesAsStrings' => true 
        );

    $connectString = sqlsrv_connect('sever_name.com', $connInfo) or die("Can't connect to the database.");


$query_infor = "SELECT * FROM ElectronicShop WHERE WorkOrder=5";
$data_infor = sqlsrv_query($connectString, $query_infor) or die(print_r(sqlsrv_errors(SQLSRV_ERR_ALL), true));
$row_infor = sqlsrv_fetch_array($data_infor);

echo "Printing the name outside the textbox: ".$row_infor['fullname']."<br><br>";
echo "Should show both LastName and FirstName: <input id=\"fullname\" type=\"text\" name=\"fullname\" value=".$row_infor['fullname']." >";

?>

enter image description here

This is because you don't have the value attribute in quotes. Your HTML looks like this: value=Brown Sam as opposed to value="Brown Sam".

You should use something like this:

echo 'Should show both LastName and FirstName: <input id="fullname" type="text" name="fullname" value="'.$row_infor['fullname'].'" >';