Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Error Problem

  1. #1
    Regular Coder
    Join Date
    May 2003
    Location
    34° 54' N 82° 13' W
    Posts
    996
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Error Problem

    PHP Code:
    <?php
    include ('config.php');
    $link = @mysql_pconnect($location$username$password)
         or die(
    "Could not connect to the databaseserver. Please go back and try again or try again later.");
    @
    mysql_select_db($database,$link)
         or die (
    "Could not select database. Please go back and try again or try again later.");
    $sql "SELECT EntryNo,Name,Date,Subject,Email,TheNews FROM News ORDER BY EntryNo DESC";
    $news mysql_query($sql,$link) or die(mysql_error().'<p>'.$sql.'</p>');

    if (
    $news){
       if (
    mysql_num_rows($news)== 0){
         echo (
    "No newsitems found.");
       }
       else{
         while (
    $row mysql_fetch_assoc($news)){
          echo(
    "<b>");
          echo(
    "<font size=3 color=seagreen>");
          echo(
    "<a href=\"viewnewsid.php?id=.$row['EntryNo'].\">"); /*Line 44*/
          
    echo($row['Subject']);
          echo(
    "</a>");
        }
      }
    }
    else{
       echo(
    "Queryproblem");
    }
     
    ?>
    My error is on line 44, but I can't pinpoint what I'm doing wrong.
    Can anyone else see it?

    Thanks
    Stevie Peele
    Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
    #dev - any programming,etc. question
    #design - design discussion and critque
    #central - general chat
    Come join us!

  • #2
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok, i think i can see it

    echo('<a href="viewnewsid.php?id='.$row['EntryNo'].'">');

    try that?

  • #3
    Regular Coder
    Join Date
    May 2003
    Location
    34° 54' N 82° 13' W
    Posts
    996
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Great! It works!
    Stevie Peele
    Neverside IRC Network - irc.veonex.net | tc.tutorialnetwork.org
    #dev - any programming,etc. question
    #design - design discussion and critque
    #central - general chat
    Come join us!


  •  

    Posting Permissions

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