title: Echo form data without sending to server
body: <p>I have a tiny form on a page where I ask for the users name, the form sends the data to name.php and echos back the users name for example "Hello Steven" Steven being the name entered into the form.</p>
  
  <p>Now that the name has been echoed to that form, I would like to echo that same data again elsewhere on the page. This is where I've run into a wall.</p>
  
  <p>I would rather not send the names entered into the form to a server or database, but simply keep them for a session and then lose them.</p>
  
  <p>The issue now is echoing the form data multiple times on one page.</p>
  
  <p>The code I am using right now for the tiny form is as follows:</p>
  
  <pre><code>&lt;form role="form" id="inviteform3" class="form-inline" action="name.php" method="POST"&gt;
  &lt;div class="form-group"&gt;
  &lt;input type="text" class="form-control input-sm" name="name" placeholder="Your Name" 
  id="hello" autocomplete="off" style="margin-top:10px"&gt;
                              &lt;/div&gt;
                              &lt;center&gt;
                              &lt;span id="result"&gt;&lt;/span&gt;
                              &lt;button class="btn btn-brand btn-sm next-screen animated bounceInUp" 
  id="go" style="margin-top:5px; display:none" href="#services" data-animation-delay=".5s"&gt;  
  Let's Go!&lt;/button&gt;&lt;/center&gt;
  
  &lt;button class="btn btn-block btn-brand btn-xs invitebtn3" id="casi" type="submit" 
  style="margin-top:5px"&gt;&lt;i class="fa fa-thumbs-o-up"&gt;&lt;/i&gt; Submit&lt;/button&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>My php form (name.php) is as follows:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
  Let's get started, &lt;?php echo $_POST["name"]; ?&gt;
  
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>and my js code is:</p>
  
  <pre><code>&lt;script&gt;
  
  $(document).on("ready", function(){
  //Form action
  $("#inviteform3").on("submit", function(event){
  // Stop submit event
  event.preventDefault();
  $.ajax({
      type:'POST', 
      url: 'name.php',
      data:$('#inviteform3').serialize(), 
      success: function(response)  
      {
          $('#inviteform3').find('#result').html(response);
      }});
  });
  });
  
  &lt;/script&gt;
  </code></pre>