I am looking to <img scr $items based on a field called “pic”> in mysql database, based on this dd.php script, that works with ajax. I think it’s just simple syntax around the echo, but I i’ve been looking at it so long, I’ve confused myself. Any help or a lead on a good forum would be appreciated. Here’s the piece in the code:
[code=php]
<h2>(S)Ajax Example</h2>
<p>In this example the fields are updated automatically in the DB when the item is dropped, using the AJAX method (SAJAX to implement with PHP)</p>
<br />
<ul id=”sajax1″ class=”sortable boxy”>
<?php
$r = mysql_query(“SELECT * FROM layout WHERE `set` = ‘sajax1’ ORDER BY `order` ASC”);
while($rw = mysql_fetch_array($r))
{
echo ‘<li id=”‘.$rw[‘item’].'”>’.$rw[‘item’].'</li>’;
}
?>
</ul>
<ul id=”sajax2″ class=”sortable boxy”>
<?php
$r = mysql_query(“SELECT * FROM layout WHERE `set` = ‘sajax2’ ORDER BY `order` ASC”);
while($rw = mysql_fetch_array($r))
{
echo ‘<li id=”‘.$rw[‘item’].'”>’.$rw[‘item’].'</li>’;
}
?>
</ul>