Guest User

Untitled

a guest
Nov 7th, 2018
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. public function RequestAction(){
  2. if ( $this->session->has('sid') ){
  3. $co = $this->session->get('sid') ;
  4. $user = Customers::findFirst("cid = '$co'") ;
  5.  
  6. if ( $this->request->isPost() ){
  7. $request = $this->request->getPost("request") ;
  8. $crm = CrmOfficer::findFirst()->oid;
  9. $this->response->redirect('user/added') ;
  10.  
  11. $rand =rand(10000000,99999999);
  12. $strrand = (string)$rand;
  13. $strasset = (string)$asset;
  14. $intp = (int)$assetprice;
  15.  
  16. $servername = "localhost";
  17. $username = "root";
  18. $password = "";
  19. $dbname = "mydb";
  20. $conn = new mysqli($servername, $username, $password, $dbname);
  21.  
  22. $sql = "INSERT INTO carry_request VALUES ('$co','$crm','$strrand','$request')";
  23. $conn->query($sql);
  24. }
  25.  
  26. }else {
  27. var_dump("Don't User") ;
  28. exit() ;
  29. }
  30. }
Add Comment
Please, Sign In to add comment