www.webdeveloper.com
Results 1 to 6 of 6

Thread: HELP New to Code Igniter?? Trying to setup FORM valiation, cannot get it to work?? HE

  1. #1
    Join Date
    Feb 2012
    Location
    Sacramento, CA
    Posts
    64

    HELP New to Code Igniter?? Trying to setup FORM valiation, cannot get it to work?? HE

    My site is SealTeamRealty.com and click on the contact form..

    All it does it go back to the home page.

    I've never used CodeIgniter before so not sure if I set it up right but I tried to follow the directions..


    Please help!

  2. #2
    Join Date
    Apr 2013
    Posts
    56
    Can you show us what are the errors that you get? Maybe you can paste the code from controller so we can see what is wrong?

  3. #3
    Join Date
    Feb 2012
    Location
    Sacramento, CA
    Posts
    64

    Here's the form file

    <?php

    class Form extends CI_Controller {

    function index()
    {
    $this->load->helper(array('form', 'url'));

    $this->load->library('form_validation');

    if ($this->form_validation->run() == FALSE)
    {
    $this->load->view('myform');
    }
    else
    {
    $this->load->view('formsuccess');
    }
    }
    }
    ?>

  4. #4
    Join Date
    Feb 2012
    Location
    Sacramento, CA
    Posts
    64
    On my contact form you should be able to see the source code right?

  5. #5
    Join Date
    Feb 2012
    Location
    Sacramento, CA
    Posts
    64
    I don't get no error, once I click submit I it just goes back to the home page.

  6. #6
    Join Date
    Apr 2013
    Posts
    56
    I do not use CodeIgniter, but I suggest the following. First check that the controller you have posted is really getting called. My guess is you are still in default welcome controller. I assume this because of the 2 messages at the top of your page. Your url for the form controller looks weird. I would assume something like this http://sealteamrealty.com/index.php/Form/index for it. If you read documentation it states that the url patterns match this: http://example.com/[controller-class]/[controller-method]/[arguments]. You can read more about it here. Hope this helps.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles