Guest User

Untitled

a guest
Jul 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.89 KB | None | 0 0
  1.         $this->load->library('form_validation');
  2.  
  3.         $this->form_validation->set_rules('book_title', 'Title', 'required|xss_clean|max_lenth[50]');
  4.         $this->form_validation->set_rules('book_type', 'Book Type', 'required|xss_clean');
  5.         $this->form_validation->set_rules('book_audience', 'Audience', 'required|xss_clean');
  6.  
  7.         if ($this->input->post('book_type') = 'Paid') {
  8.  
  9.             $this->form_validation->set_rules('book_price', 'Price/Donation Amount', 'required|xss_clean|numeric|less_than[10.01]|greater_than[0]');
  10.  
  11.         } else {
  12.  
  13.             $this->form_validation->set_rules('book_price', 'Price/Donation Amount', 'required|xss_clean|numeric|less_than[10.01]');
  14.  
  15.         }
  16.  
  17.  
  18. // This is the error I'm getting:
  19. // Fatal error: Can't use method return value in write context in /home/ezpublis/public_html/dev/bonfire/application/controllers/publish.php on line 46
  20.  
  21. // Line 46 = if ($this->input->post('book_type') = 'Paid') {
Add Comment
Please, Sign In to add comment