Page 1 of 1

Too few arguments?

Posted: Sat May 07, 2011 7:28 am
by thumbliner
The irritating novice is back!! :mrgreen:

Hey guys, need your help again.

I just coded an INSERT records page. But after all was done, this is the error I am getting. I fill the form and when I click, INSERT. I get this error.

Why?

Image

Re: Too few arguments?

Posted: Sat May 07, 2011 9:28 am
by internet-solution
whats in the GetSQLValueString() function?

Re: Too few arguments?

Posted: Sat May 07, 2011 9:36 am
by McInfo
This statement prints the string "hello world".

Code: Select all

echo sprintf('%s %s', 'hello', 'world');
This statement triggers an error because the format string tells sprintf() to make two substitutions but there are only enough arguments to do one substitution.

Code: Select all

echo sprintf('%s %s', 'hello');
If you read the error message, it tells you exactly what the problem is.
Warning: sprintf(): Too few arguments in C:\wamp\www\dwwithphp\admin_add_pilot.php on line 57
  • The type of error is E_WARNING.
  • The function that triggered the error is sprintf().
  • The reason for the error is that there were fewer arguments passed to the function than expected.
  • The error was discovered in the file "C:\wamp\www\dwwithphp\admin_add_pilot.php".
  • The error was discovered on line 57, but may have been caused by something before that line.