Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-26-2008, 09:23 PM   PM User | #1
rob7676
New to the CF scene

 
Join Date: Jan 2008
Location: Tampa
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
rob7676 is an unknown quantity at this point
Need help with error

I have a search script for searching .pdf files which works great, but I get an
Quote:
Warning: printf() [function.printf]: Too few arguments in /index.php on line 84
My code for line 84 is:
Quote:
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
__________________
Enviro Kleen
rob7676 is offline   Reply With Quote
Old 02-26-2008, 09:33 PM   PM User | #2
Fumigator
UE Antagonizer


 
Fumigator's Avatar
 
Join Date: Dec 2005
Location: Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
Posts: 7,687
Thanks: 42
Thanked 637 Times in 625 Posts
Fumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of lightFumigator is a glorious beacon of light
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?
__________________
Fumigator is offline   Reply With Quote
Old 02-26-2008, 10:49 PM   PM User | #3
rob7676
New to the CF scene

 
Join Date: Jan 2008
Location: Tampa
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
rob7676 is an unknown quantity at this point
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.
__________________
Enviro Kleen
rob7676 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:46 AM.


Advertisement
Log in to turn off these ads.