Add a value to a multi value list when updating

15 posts by 2 authors in: Forums > CMS Builder
Last Post: June 3, 2013   (RSS)

By gkornbluth - May 31, 2013

Hi Greg,

Sorry, but I’m at a loss again.

I’m trying to implement the add and remove values from a multi value list, and when using the email_address as the required matching value to determine which record to update:

If the first name, last name and email address entered are the same, the code works perfectly.

However, if the first and/or last name is not the same, I get “Undefined variable: recnumber2" errors, and I can’t figure out why. (I’ll probably feel dumb once more when I find out the answer)

Probably has a lot to do with how I’m retrieving the record number ($recnum2) of the record to be updated but can’t think of another way to retrieve it.

I’ve attached my latest version of the sign in file, but the code that has an issue is between line 56 and 117

Hope you have a moment to take a look.

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:

salon-sign-in-awcf.php 15K

By gregThomas - May 31, 2013

Hi Jerry, 

I don't mind having a look into the problem. Could you tell me the full error message you're getting? It would be useful to know which line the code stops working on. 

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By gkornbluth - May 31, 2013 - edited: May 31, 2013

Thanks Greg,

This is the complete error message:

Notice: Undefined variable: recnumber2 in /hsphere/local/home/a887307/elleschorrphotography.com/salon-sign-in-AWCf.php on line 86 Notice: Undefined variable: recnumber2 in /hsphere/local/home/a887307/elleschorrphotography.com/salon-sign-in-AWCf.php on line 96 Notice: Undefined variable: recnumber2 in /hsphere/local/home/a887307/elleschorrphotography.com/salon-sign-in-AWCf.php on line 100 Notice: Undefined variable: recnumber2 in /hsphere/local/home/a887307/elleschorrphotography.com/salon-sign-in-AWCf.php on line 109

If you need login info I can send it to your email

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

By gkornbluth - June 3, 2013

Hi Greg,

Thanks for finding the culprit.

I don't think you uploaded the changes that you made, but if allow search was the only change, I can make that change myself.

Actually, the client wanted to allow folks to change their names if they wanted to. (From formal to less formal, etc.)

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