tags:

views:

314

answers:

1
Warning: sprintf() [function.sprintf]: Too few arguments in /home/inrunitc/public_html/chek/chek.php on line 132
Query was empty

I am new to PHP and mysql and I have like 88 fields in my form - what should I do ?

+1  A: 

This happens if you have something like

$s = sprintf('%d %d %d', 4);

There are three placeholders in the format string but only one parameter.

VolkerK
what if you had this: $s = sprintf('%d %d', 4, 2, 1); Would this replace the two digit spaces and ignore the third supplied number (1) or throw an error.
Ashley Ward
@Ashley: No error/warning/notice message with the vanilla php.net 5.3.3 build, but there may be other (patched/hardened) builds that raise e.g. a notice.
VolkerK