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
  1. #1
    New to the CF scene
    Join Date
    Jan 2008
    Location
    Tampa
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help with error

    I have a search script for searching .pdf files which works great, but I get an
    Warning: printf() [function.printf]: Too few arguments in /index.php on line 84
    My code for line 84 is:
    printf("<tr><td><a href=\"/msds/" . trim($row["productnumber"]) . ".pdf\">" . $row["productnumber"] . "</a></td><td>" . trim($row["productname"]) . "</td></tr>");
    Can anyone please help me with this?

    Thanks

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    My guess is there are percent signs in the values of the variables you are building the string with, which printf() recognizes as a conversion specifier, and expects an additional argument to complete the conversion.

    So... why are you using printf() rather than just plain ol' print?

  • #3
    New to the CF scene
    Join Date
    Jan 2008
    Location
    Tampa
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I don't PHP very well so my friend helped me with it. I changed it to print() and error went away thanks for you help.


  •  

    Posting Permissions

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