title: How to submit data to another file as it is
body: <p>I created a file<code>upload.php</code> where user can upload heading, text,images, and set color , background-color. according to their desire,. but how this data can be submitted as it is . i used jquery and javascript for this. for example</p>
  
  <p>to create heading.(i am not writing full script but if anyone need i can explain in more detail)</p>
  
  <pre><code>$("#button1").click(function(){var heading = $("&lt;h3&gt;&lt;/h3&gt;").attr({contenteditable:"true"});
                        $("div").append(heading);});
  </code></pre>
  
  <p>if user want to create simple text  by click button2</p>
  
  <pre><code>$("#button2").click(function(){var paragraph=$("&lt;p&gt;&lt;/p&gt;").attr({contenteditable:"true"});
                                    $("div").append(paragraph);});
  </code></pre>
  
  <p>And if user want to insert image first he has to upload file (long php script) and then insert  image by</p>
  
  <pre><code>$("#button3").click(function(){var image= $("&lt;img&gt;")
  .attr({src:"images/&lt;?php echo $_FILES["img"]["name"];?&gt;"});
  $("div").append(image);});
  </code></pre>
  
  <p>AND user can play with colors as well for set background-color</p>
  
  <pre><code>&lt;input type="color" id="background"&gt; &lt;button type="button" onclick="setbackground()"&gt;
  &lt;script&gt;
  function setbackground(){document.getElementsByTagName("div").style.backgroundColor=document.getElementById("background").value;
  </code></pre>
  
  <p>But the question is when user complete all what he want to write,upload.   now how he can submit it so that it can securely uploaded to the site as it is (i.e carrying all the effects user made).
  I try to use <code>&lt;form&gt;</code> and php but it is difficult to carry out all the css effects using <code>&lt;form&gt;</code> and I am using  <code>&lt;p&gt;&lt;/p&gt;</code> not <code>&lt;input&gt;</code>. so it is difficult to use<code>&lt;form&gt;</code> I am very confused . It is little bit complex but please help. I am not asking whole script just a hint will give me some direction where to go.</p>