Field 'authkey' doesn't have a default value

3 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: May 15, 2017   (RSS)

By Toledoh - May 7, 2017

Hi Guys.

I'm trying to quickly update a site to capture standard emailForm.php type input and add the data to the newsletter subscribers table...

I'm using the following, but get the error: Field 'authkey' doesn't have a default value.

mysqlStrictMode( false );

$colsToValues = array(
'email' => $_REQUEST['email'],
'first_name' => $_REQUEST['fullname'],
'phone' => $_REQUEST['phone'],
'authkey' => _nlb_generateAuthKey()
);
$recordNum = mysql_insert('_nlb_subscribers', $colsToValues, true);
$subscriber = mysql_get('_nlb_subscribers', $recordNum);

Any ideas?

Cheers,

Tim (toledoh.com.au)

By Toledoh - May 15, 2017

Thanks Ross - that's done the trick.

Cheers,

Tim (toledoh.com.au)