MYSQLI: Null value in bind_param() ??

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


Could anyone tell me if it is possible to bind a null value to a
statement? I.E.
$var1 = (something indicating null);
$var2 = (something indicating null);
$var3 = (something indicating null);

This would be useful as I have form fields that are not required and
link to database fields that allow nulls. It would be nice to include
all fields in the statement but assign a null value to fields for which
the user did not fill in the corresponding form element.

Thank you,

Re: MYSQLI: Null value in bind_param() ??

Quoted text here. Click to load it

Doesn't bind_param support the PHP null value?

$var1= null;
$var2= null;
$var3= null;


Site Timeline