title: How to secure the id that are passed in a URL?
body: <p>have a typical website that passed id values in the URL. ex. account.php?id=755</p>
  
  <p>in the account.php page I do check the value</p>
  
  <pre><code>$id = 0;
  if(isset($_GET['id'])){
      $id = intval($_GET['id']);
  }
  if($id == 0){
      echo 'this account does not exists!';
      exit();
  }
  </code></pre>
  
  <p>But, I am trying to find away to encrypt the value 755 prior displaying it and then decode it prior checking the value. So I am not displaying the the actual id but a mask.</p>
  
  <p>My question is this:
  1) Is this a good idea to encrypt and decrypt ids? so a mask will be passed and not the actual id.
  2) is there an easy way of encrypting the ids by returning a string with a mix of number and alphabets only, using PHP?</p>