1

I am developing a website in Codeigniter . I have a contact form that is in footer. i want to submit that form. but i am not finding any idea in which controller should i submit this form.Is this will be done by using library or something else? Any help would be highly appreciated.

Form is.

 <footer>
 <div class="col-md-3 fst_follow">
 <h3>Quick contact</h3>
 <img class="foot_line" src="<?php echo base_url();?>images/foot_line.png" />
 <div class="quick_form">
  <form method="post">
  <ul>
  <li>
 <input type="text" class="inputtxt" placeholder="name" /></li>
 <li>
 <input type="text" class="inputtxt" placeholder="Email*"/>
 </li>
 <li>
 <textarea class="inputtxt" placeholder="Message*"></textarea>
 </li>
 <li>
 <input type="submit" class="submit_btn" value="Submit" />
 </li>
 </ul>
 </form>
 </div>
 </div>
 </footer>
Imran Qamer
  • 2,253
  • 3
  • 29
  • 52

1 Answers1

1

A Form can be submitted from anywhere in the page. It does not matter weather it is footer or main body.

Your project may contain controller like 'UserController' or 'FrontController' in which you can create a function that handles your form request.

Replace "YOUR_CONTROLLER" & "REQUESTED_METHOD" by your data in the following code. Change this to your Form Tag:

<form method="post" action="<?php echo base_url()."YOUR_CONTROLLER/REQUESTED_METHOD"; ?>" >
Siddharth Jogia
  • 66
  • 1
  • 1
  • 8