how to get the id from database?
<p>this is my news.php ... This code will show the title, and some news contents. When you click the title, it must get the ID and directs you the article. But mine was not getting the ID. </p>

<pre><code>&lt;?php 
include 'connect.php';
?&gt;

&lt;?php
$qry = (mysql_query("SELECT * FROM articles"));?&gt;
&lt;newslist title="Latest News"&gt;
&lt;?php   
    while($row=mysql_fetch_array($qry))
        { ?&gt;

        &lt;news category="green" url="asdf.php?id="&lt;?php echo $row['id']?&gt;"" date="&lt;?php echo $row['date']?&gt;"&gt;
         &lt;headline&gt;&lt;?php echo "&lt;h1&gt;".$row['title']."&lt;/h1&gt;";?&gt;&lt;/headline&gt;
        &lt;detail&gt;&lt;?php echo "&lt;p&gt;".substr($row['content'],0,60)."..."."&lt;/p&gt;"; ?&gt; &lt;/detail&gt;
          &lt;/news&gt;

        &lt;?php 
        }?&gt;



&lt;/newslist&gt;
</code></pre>

<p>This is the javascript code fragment that(i guess) was processing the URL code above. Was the problem exists in the javascript code? (vscroller.js)</p>

<p><code>var url = $(this).attr('url');
                            var htext = $(this).find('headline').text();
                            description.append($('&lt;h1/&gt;').html("&lt;a href='" + url + "'&gt;" + htext + "&lt;/a&gt;"));</code></p>

<p>This is my asdf.php. This is the destination when you click one article.</p>

<pre><code>    `&lt;?php

     $qry=mysql_query("SELECT * FROM articles");
     if(!$qry)
     {
     die("Query Failed: ". mysql_error());
     }
     ?&gt;

     &lt;div id="content"&gt;
     &lt;?php
     while($row=mysql_fetch_array($qry))
     {
     ?&gt;
        &lt;p class="head"&gt;Posted In: &lt;?php echo $row['category'];?&gt;&lt;/p&gt;
        &lt;div class="line"&gt;&lt;/div&gt;
        &lt;h1&gt;&lt;?php echo $row['title'];?&gt;&lt;/h1&gt;
        &lt;div class="line"&gt;&lt;/div&gt;
        &lt;p class="meta"&gt;&lt;?php echo $row['date']." "."Written By: ".$row['author'];?&gt;
        &lt;/p&gt;
        &lt;div id="article" class="article"&gt;
        &lt;p class="intro"&gt;
        &lt;?php echo "&lt;img src=".$row['image']."/&gt;"."&lt;p&gt;".$row['content']."&lt;/p&gt;";?&gt;&lt;/p&gt;
        &lt;div class="line"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;

    &lt;?php
    }
    ?&gt;

&lt;p id="pc_reference" class="meta"&gt;&lt;a href="demo.php"&gt;Back to News Page&lt;/a&gt;&lt;/p&gt;
        &lt;/div&gt;`        
</code></pre>

<p>this code is from the page where i display the news.php(main.php)</p>

<pre><code>    `&lt;script type="text/javascript"&gt;
     $(document).ready(function () {
        $('#vscroller').vscroller({ newsfeed: 'news.php' });
     });
     &lt;/script&gt;

    &lt;html&gt;
    &lt;body&gt;
    &lt;div class="news-wrapper" id="vscroller"&gt;&lt;/div&gt;`
</code></pre>

<p>the original source for this can be found at <a href="http://www.egrappler.com/xml-driven-vertical-news-scroller-script-using-html-and-jquery-vscroller/" rel="nofollow">http://www.egrappler.com/xml-driven-vertical-news-scroller-script-using-html-and-jquery-vscroller/</a></p>
