Membership Signup Form Syntax question

Re: [gkornbluth] Membership Signup Form Syntax question

By robin - August 30, 2011

Hey Jerry,

Could you post the full SQL you're using to insert into the accesslist? I think that would help a lot to track the problem down.

Thanks,
Robin
Robin
Programmer
interactivetools.com

Re: [robin] Membership Signup Form Syntax question

By gkornbluth - August 30, 2011 - edited: August 30, 2011

Robin,

I think I found the answer.

It appears the code should be '$records_allowed' without the "echo".

Oh well.

Learning comes slow sometimes.

Thanks,

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Membership Signup Form Syntax question

By robin - August 30, 2011

Hey Jerry,

Glad you got the problem fixed. Problems within a string can be hard to track down!

Thanks,
Robin
Robin
Programmer
interactivetools.com

Re: [robin] Membership Signup Form Syntax question

By gkornbluth - August 30, 2011 - edited: August 31, 2011

OK, I spoke too soon.

The code works with numerical values as the value pulled from the subscriber_level_values text field, but doesn’t work when I try to insert the value NULL.

I’ve attached the Viewer code in the hope that it's an easy solution.

Thanks,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Attachments:

platinumlevelsignup.php 27K

Re: [gkornbluth] Membership Signup Form Syntax question

By robin - August 31, 2011

Hey Jerry,

I think your problem might be database related. If you try to insert a NULL into a integer field in MySQL you can't use single quotes because then it's a string 'NULL' instead of a real NULL.

so

$records_allowed instead of '$records_allowed'

Hope that helps,
Robin
Robin
Programmer
interactivetools.com

Re: [robin] Membership Signup Form Syntax question

You're SOOOO smart.

Thanks Robin
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php