title: HTML in MySQL Database -- Best Practices
body: <p>I'm beginning to create a system whereby I (as the only user at present) will be loading a dynamically created PHP page which has a <code>&lt;table&gt;</code> in it.  I then will be grabbing the HTML of that <code>&lt;table&gt;</code> and saving it to be displayed to other users in a separate area of the website.</p>
  
  <p>My Questions: What are some best practices to follow for this kind of thing?  Saving the HTML as TEXT or LONGTEXT in MySQL?  BLOB?  Maybe even saving this data as a .txt file which uses PHP <code>include()</code> to include it into the file which displays it to users?</p>
  
  <p>I'm not really sure of the best approach for this kind of thing, and thus the barrage of questions.  I'm also not very familiar with creating databases and therefore, I'm not knowledgeable as to their strengths/weaknesses.  It <em>seems</em> like using a MySQL database for this is the way to go, but I'm not married to it.</p>
  
  <p>Note #1: The HTML <strong>must</strong> be preserved in it's entirety.  So something like <code>&lt;div&gt;Let's use blue for this.&lt;/div&gt;</code> can't end up coming out as <code>&lt;div&gt;Let\'s use blue for this.&lt;/div&gt;</code>.  </p>
  
  <p>Note #2: The table I'm saving from gets randomly generated (including number of rows/columns) each time.  So, I need all data within the table, including all <code>&lt;tr&gt;</code>'s and <code>&lt;td&gt;'s</code>.</p>