Jump to content

Custom Fields Values


kkoseoglu

Recommended Posts

First, it is not a problem. It is what I cant find any suitable codes.

Situation,

In our website, when people register, they recieved sms. I put custom fields called "Mobile Number" in admin panel. It takes pilot's mobile number and thanks to sms api system it automatically sends sms.

How I do?

as you know after registration process fields are sended to core/RegistrationData.class.php

In 135. line the customfields data is starting as

//Get customs fields
    $fields = self::getCustomFields();

    if(count($fields) > 0) {
	    foreach ($fields as $field) {
		    $value = Vars::POST($field->fieldname);
		    $value = DB::escape($value);

		    if ($value != '') {
			    $sql = "INSERT INTO `".TABLE_PREFIX."fieldvalues` (fieldid, pilotid, value)
 VALUES ($field->fieldid, $pilotid, '$value')";

			    DB::query($sql);
		    }
	    }
    }

I found $value as Mobile number.

So when I assign new variable like $mobile=$value , it is fine and work. And the api take the $mobile and send SMS.

However, I decided that I added one more custom fields which is Vatsim ID. When I do this $value is not working anymore. So, do you have any idea that how can I fetch the mobile number data rather than $value . What I mean $mobile= ????

Any help appreciated.

Thanks,

Kıvanç

www.hapyywings.org

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...