Results 1 to 2 of 2

Thread: auto updated links

  1. #1
    Join Date
    Oct 2007
    Posts
    103

    auto updated links

    Hi all,
    The query below brings three results. I also want a link at the end of each result for "Read More" to be updated automatically based on the id of the displayed reult. Then I will get that id in another page, to display the corresponding article.
    table is like this: id, date, title, par1
    The problem is the syntax of the last line. It is not working. I need to transfer this id to another page. Can anybody tell me what is the syntax error here? Or if this is not good, how can I achieve transferring this id when clicked to another page?
    The rest of the code was working, displaying three results properly, before the last line was there. But I need that auto updated link too.
    $query=mysql_ query("select * from newsa ORDER BY id DESC LIMIT 3");
    while ($row = mysql_fetch_ array($query) )
    {
    echo"<p class='newstitle1' >" . $row['date'] ."<br/>". $row['title' ] . "</p>".
    "<p id=newstext1> " . $row['par1'] ."</p>".
    "<a href=" whole article.php? id=<?= $row['id'] ?>">"."(Read more...)"."< /a>" ; }

  2. #2

    Try a Script

    Quote Originally Posted by ketanco
    Hi all,
    The query below brings three results. I also want a link at the end of each result for "Read More" to be updated automatically based on the id of the displayed reult. Then I will get that id in another page, to display the corresponding article.
    table is like this: id, date, title, par1
    The problem is the syntax of the last line. It is not working. I need to transfer this id to another page. Can anybody tell me what is the syntax error here? Or if this is not good, how can I achieve transferring this id when clicked to another page?
    The rest of the code was working, displaying three results properly, before the last line was there. But I need that auto updated link too.
    $query=mysql_ query("select * from newsa ORDER BY id DESC LIMIT 3");
    while ($row = mysql_fetch_ array($query) )
    {
    echo"<p class='newstitle1' >" . $row['date'] ."<br/>". $row['title' ] . "</p>".
    "<p id=newstext1> " . $row['par1'] ."</p>".
    "<a href=" whole article.php? id=<?= $row['id'] ?>">"."(Read more...)"."< /a>" ; }
    You can try some a script located at: scripts.thomain.com
    The script is about picture gallery management. Here you can get the ID updation at the end of the result page.
    Hope you will get help from it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •