- 
	
What is the default database driver used in CodeIgniter?
- A) MySQL
 - B) SQLite
 - C) PostgreSQL
 - D) MongoDB
 
Answer: A) MySQL
 - 
	
Which file contains the database configuration settings in a CodeIgniter project?
- A) application/config/database.php
 - B) application/config/config.php
 - C) system/database/config.php
 - D) system/config/database.php
 
Answer: A) application/config/database.php
 - 
	
How do you load a model in a CodeIgniter controller?
- A) 
$this->model('Model_name') - B) 
$this->load_model('Model_name') - C) 
$this->load->model('Model_name') - D) 
$this->import_model('Model_name') 
Answer: C)
$this->load->model('Model_name') - A) 
 - 
	
Which CodeIgniter library is used for form validation?
- A) Form_Validation
 - B) Input_Validation
 - C) Validation_Helper
 - D) Form_Helper
 
Answer: A) Form_Validation
 - 
	
How do you set validation rules for form fields in CodeIgniter?
- A) By calling the 
set_rules()method - B) By using HTML5 attributes in the form fields
 - C) By creating custom validation functions
 - D) By defining rules in the controller constructor
 
Answer: A) By calling the
set_rules()method - A) By calling the 
 - 
	
Which method is used to handle form submissions and validate input in CodeIgniter controllers?
- A) 
handle_submission() - B) 
validate_input() - C) 
submit_form() - D) 
form_validation->run() 
Answer: D)
form_validation->run() - A) 
 - 
	
How do you set flashdata messages in CodeIgniter?
- A) 
set_flashdata() - B) 
flash_message() - C) 
set_message() - D) 
add_message() 
Answer: A)
set_flashdata() - A) 
 - 
	
Which of the following is NOT a valid session driver supported by CodeIgniter?
- A) File
 - B) Database
 - C) Redis
 - D) Memcached
 
Answer: B) Database
 - 
	
How can you access session data in a CodeIgniter controller?
- A) Using the 
$this->session->get()method - B) Using the 
$this->session->userdata()method - C) Using the 
$this->session_data()function - D) Using the 
$this->get_session_data()method 
Answer: B) Using the
$this->session->userdata()method - A) Using the 
 - 
	
Which of the following is NOT a valid HTTP request method in CodeIgniter?
- A) GET
 - B) POST
 - C) DELETE
 - D) MODIFY
 
Answer: D) MODIFY
 

Comments