Echo PHP variable as an value of input field
<p>I have a simple HTML form with multiple input tags. On page load i provide data to the form to echo the current value of field from database and than user can modify those values and submit again to perform an update.</p>

<pre><code>&lt;input type="text" name="nameMember" id="nameMember" value=&lt;?php echo (isset($nameMember)) ? $nameMember: ''?&gt;&gt;
</code></pre>

<p>Code works fine except that it do not display complete variable.</p>

<p>For example, If $nameMember = 'Saurabh Pradhan' than instead of showing 'Saurabh Pradhan' as value of input tag it only shows 'Saurabh'.</p>

<p>If i remove the space from the data and make it to 'SaurabhPradhan' it displays complete name. Basically it is only removing the text after space.</p>