title: How to store PHP+HTML script into one variable and insert that variable into MySQL database?
body: <p>I don't know is this possible or not. My requirement is like this:</p>
  
  <pre><code>&lt;?php
  $str=&lt;&lt;&lt;abc
  $sql=mysql_query("select * from links where column='value'");
  $sq1=mysql_fetch_row($sql);
  $s1=$rec[13];
  $s2='Done';
  if($s1==$s2) {
  &lt;form name=f1 method=post action=\"xxx.php\"&gt;
  &lt;input type=hidden name=income value=$rec[value]&gt;
  &lt;input type=submit value=\"Accept\" id=submit2 name=submit2 disabled=\"disabled\"&gt;
  &lt;/form&gt;
  }
  else
  &lt;form name=f1 method=post action=\"xxx.php\"&gt;
  &lt;input type=hidden name=uname value=$rec[value]&gt;
  &lt;input type=submit value=\"Accept\" id=submit2 name=submit2 "&gt;
  &lt;/form&gt;
  abc;        
  ?&gt;
  </code></pre>
  
  <p>I don't know the above format is correct or not. Please suggest supportable format.</p>
  
  <p>In above format I used to store PHP+HTML script into <code>str</code> variable. I heard about <code>htmlentities()</code> and <code>htmlspecialcharecters()</code> functions but I don't know how to use those.</p>
  
  <p>If the value is inserted those value will be accessed from front end using <code>mysql_fetch_row()</code> to display those inserted values.</p>
  
  <p>If above is supportable suggest me with good example. If not then suggest which is better to store PHP+HTML script into variable.</p>
  
  <p>MySQL supports this type of queries.</p>
  
  <p>Help any one</p>
  
  <p>Great thanks.</p>