title: Actual input contents are not preseving on most of the browsers [FF,MSIE7/8 and etc]
body: <p>I'm working on one application ( using PHP, javascript ). Below is the short description about my problem statement</p>
  
  <p>There are two forms avaliable on my application, i.e. SourceFrm and targetFrm.
  I am taking input on first form i.e. SourceFrm and doing processing on targetFrm.</p>
  
  <p>Below is the input which I am taking from <strong>SourceFrm :</strong></p>
  
  <p>1) Enter your data (Identification of this input box <strong>id is 'inputdata'</strong> ):</p>
  
  <p>2) Enter id ( Identification input box id is id ):</p>
  
  <p>As per above input feed by user I am posting this data to targetFrm for further processiong.</p>
  
  <p>On <strong>TargetFrm</strong> :</p>
  
  <p>I am simply assigning inputdata value to php varible.
  The spaces which are in between of words are getting lost ( <strong>more than one spaces converting to one space</strong>).</p>
  
  <p>e.g. 
  User has added below data on input box and submitted</p>
  
  <p><strong>inputdata:</strong></p>
  
  <pre><code>This is my     test.
  </code></pre>
  
  <p>Here observed that user has added 5 spaces in between 'my' and 'test' word.
  After assigning this input data to php variable. After that I printed this value
  Below content I am getting</p>
  
  <p><strong>Output:</strong> </p>
  
  <pre><code>This is my test.
  </code></pre>
  
  <p>More than one spaces is converting to one space. This behaviour I checked on all browsers like FF,MSIE7/8 opera, safari, chrome.</p>
  
  <p>If have used <code>'&lt;pre&gt;'</code> before printing php variable i.e.:</p>
  
  <pre><code>print "&lt;pre&gt;";
  print $inputdata;
  </code></pre>
  
  <p>At time spaces are not getting lost (I am getting exact content). </p>
  
  <p>Here my conflict is how do I presrve exact contents without using <code>'&lt;pre&gt;'</code>.
  I have used encoding/decoding (htmlentitiesencode() and decode () )functionality,  in my further data processing, so it may create some conflict if i replace spaces with <code>&amp;nbsp;</code>. ( May conflict ll occur if i use <code>&amp;nbsp;</code> instead space ).</p>
  
  <p>Is anyone has any ideas, suggestions please suggest.</p>
  
  <p>-Thanks</p>