Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>So i revised the structure of this Feed System and found out an easier way to do this is to generate the html from php.</p> <p>So here's the PHP with HTML</p> <pre><code>&lt;?php require_once 'db_conx.php'; $Result = mysql_query("SELECT * FROM profiles ORDER BY lastupdated desc limit 10") or die (mysql_error()); while($row = mysql_fetch_array($Result)){ echo '&lt;div style="margin-bottom:2px"&gt; &lt;span id="name" style="float:right; height:21px;font-weight:bold; color:#000; width:71%"&gt; &lt;span class="LogName"&gt;'.$row['name'].'&lt;/span&gt; &lt;/span&gt; &lt;span id="slogan" style="float:right; height:21px;color:#0D1; width:71%" class="goog-flat-menu-button"&gt; &lt;span class="LogSlogan"&gt;'.$row['slogan'].'&lt;/span&gt; &lt;/span&gt; &lt;span id="services" style="float:right; height:21px;color:#000; width:71%" class="goog-flat-menu-button"&gt; &lt;span class="LogServices"&gt;'.$row['services'].'&lt;/span&gt; &lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;span id="ProfileMap" style="height:170px; background-image:url(images/bg/iWhiteBg.fw.png)"&gt;&lt;/span&gt; &lt;span id="LogPid" style="height:170px; background-image:url(images/bg/iWhiteBg.fw.png)"&gt;&lt;/span&gt; &lt;/div&gt;'; } ?&gt; </code></pre> <p>Ajax.</p> <pre><code>$.ajax({ type:"GET", url:"../php/feed.php" }).done(function(feedback){ $('#feed').html(feedback) }); </code></pre> <p>and just one Div of HTML in the body to house the incoming HTML.</p> <pre><code>&lt;body&gt; &lt;div id='feed'&gt;&lt;/body&gt; &lt;/body&gt; </code></pre> <p>Done.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload