Get all of the <li> that is part of a <ul> and Post the values
<p>All,
I've got the following PHP code:</p>

<pre><code>$qry = "Select * from uploaded_files where user_id='$_SESSION[oml_user_id]' and upload_type='video_montage' order by sort ASC";
$result = mysql_query($qry);
$resultrows = mysql_num_rows($result);
if($resultrows&gt;0){
?&gt;
&lt;ul class="gallery" id="video_gallery"&gt;
&lt;?php
while($resultset = mysql_fetch_array($result)){
?&gt;
&lt;li id="&lt;?php echo $resultset['file_id']; ?&gt;"&gt;&lt;a href="../upload/&lt;?php echo $resultset['filename']; ?&gt;"&gt;&lt;img src="../upload/thumbnails/&lt;?php echo $resultset['filename']; ?&gt;" width="116" height="116" alt=""&gt;&lt;/a&gt;&lt;/li&gt;
&lt;?php
}
?&gt;
&lt;/ul&gt;
&lt;button id="save_info"&gt;Save&lt;/button&gt;
</code></pre>

<p>What I'd like to happen is when I click the save_info button I'd like to determine the current order of the li and the corresponding IDs of them that are associated with the ul. I'd like to then be able to just the .post function to submit them to a function to save these values to my database.</p>

<p>How can I determine the current order and IDs of the lis on my page?</p>

<p>Thanks in advance!</p>
