kkoseoglu Posted February 27, 2014 Report Posted February 27, 2014 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 Quote
kkoseoglu Posted March 26, 2014 Author Report Posted March 26, 2014 I wrote a new sql sentence to get the number $sql = "SELECT * FROM phpvms_fieldvalues WHERE fieldid=2 and pilotid=$pilotid" ; $mobile= $row["value"]; and I solved. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.