Problem when updating data api php

I am working on scripts api but I am having a problem strange and I deal with PPPOE all data is updated correctly, but return value limit-bytes-out if the value increased from 10 back to 0 and if the 10 back to two at any process of updating the knowledge that there are no mistakes I do I edit software USERNAME and PASSWORD properly and there is no mistakes so what are the problem

   $API->comm('/ppp/secret/set',array(
    ".id"=>$_POST['i'],
		"name"=>$_POST["u"],
		"password"=>$_POST["p"],
		"profile"=>$_POST["pr"],
		"caller-id"=>$_POST["mac"],
		"limit-bytes-out"=>$tx,
		"limit-bytes-in"=>$rx,
		"comment"=>$_POST["u"],
		));

but return value limit-bytes-out if the value increased from 10 back to 0 and if the 10 back to two at any process of updating the knowledge that there are no mistakes

I know these words, but the combination of them does not make any sense. What are you saying here?

Could you maybe rephrase that? With shorter sentences maybe?

I do translations and apologized if there was an error in writing

When I add the amount of download to someone at work and update the value change

Ummm… So… When you add “limit-bytes-in”, the value of “limit-bytes-in” changes to the value you have specified? OK… And… What do you expect to happen instead?

An ID is not the same thing as the numbers from Winbox.

Try to use the name instead, and use “numbers” instead of “.id”, i.e.:

   $API->comm('/ppp/secret/set',array(
      "numbers"=>$_POST["u"],
      "name"=>$_POST["u"],
      "password"=>$_POST["p"],
      "profile"=>$_POST["pr"],
      "caller-id"=>$_POST["mac"],
      "limit-bytes-out"=>$tx,
      "limit-bytes-in"=>$rx,
      "comment"=>$_POST["u"],
      ));

Though keep in mind that if you want to modify the username, you should have a separate field with the “current” username, and then another one for the “new” username.

The same thing also Experiment on your own then add the previous code within a file, and then add this code and then Experiment

  	 $API->comm('/ppp/secret/set',array(
    "numbers"=>$regtable2['.id'],
	"disabled"=>"false",
		
		));

Is there a question here?

The problem has been resolved, but now the problem I can not encoded in writing with the names in Arabic that there is more than a system that supports the Arabic language I hope to find help from anyone and is responsible for the language code in order to doing my Edited attic

As I already told you in your other topic, Winbox uses windows-1256, so that’s what you should use also.

On possible give me an example for converting language coding?



iconv('windows-1256', 'utf-8', $text);//When receiving
iconv('utf-8', 'windows-1256', $text);//When sending

I’m sorry, I know you are tired with me, but how do I use it inside the class

You don’t. You use it outside the class, over every piece of data that may contain Arabic. Apply the first right after receiving, and apply the second right before sending.

I’m not tired with “you”. I am however still astonished at your insistence on using a crappy API client in the presence of not one, but two better ones, one of which has the very thing you’re after “out of the box”.

My offer of rewriting your entire app from routeros_api class to PEAR2_Net_RouterOS still stands.