423,131 Members | 2,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,131 IT Pros & Developers. It's quick & easy.

Where is the problem of my php code?

P: 1
Expand|Select|Wrap|Line Numbers
  1. $getAddressInfo = $block_io->get_address_by_label(array('label' => $session->username));
  2.         $a = print $getAddressInfo->data->label;
  3.  
  4.         if ($a == $session->username)
  5.         {
  6.  
  7.             echo "<br>SEND DOGE TO THIS ADDRESS<br>".$getAddressInfo->data->address."<br>";
  8.  
  9.  
  10. } else
  11.     {
  12.          $newAddressInfo = $block_io->get_new_address(array('label' => $session->username));
  13.             echo "<br>SEND DOGE TO THIS ADDRESS<br>".$newAddressInfo->data->address."<br>";
  14. }
  15.  
when i run it, there are errors like this:
Fatal error: Uncaught Exception: Failed: Label already exists on your account for Network=DOGETEST. in C:\xampp\htdocs\join\block_io.php:117 Stack trace: #0 C:\xampp\htdocs\join\block_io.php(61): BlockIo->_request('get_new_address', Array) #1 C:\xampp\htdocs\join\index.php(63): BlockIo->__call('get_new_address', Array) #2 {main} thrown in C:\xampp\htdocs\join\block_io.php on line 117

anyone can help me fix it?
Feb 13 '18 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.