Welcome Guest, Not a member yet? Register   Sign In
Some Unexpected Behaviour.Help me on this
#1

[eluser]Unknown[/eluser]
Dear friends,

I am newbie to codeigniter. i have to do this site which was already developed by another programmer and i am working as a fresher in codeigniter.
I have this URL showing some issues.

http://eurekaholidays.co.za/accomodate/request_quote/47

if i click the submit button ,in the bottom right without filling the text fields, it shows the validation messages which is quite ok

Now if i am pressing the ENTER key in the URL area of browser (NO REFRESHING) it shows PHP ERROR encountered in all area of the site.

Can you suggest the possible solutions for this.


Regards,
Shanavas
#2

[eluser]andieevans[/eluser]
i am new to codeigniter too, but from the messages I would say check out the following files

top_menu.php
bottom_menu.php

looks like it is expecting some variables set that are not being passed through..
#3

[eluser]Steffen Brem[/eluser]
I see that when you post the form, it will post it to another controller action "accomodate::request()". This method "request()" expect some POST variables need to be set in order to work correctly.

So, if you go directly to this controller action (without submitting any data) you will get errors.

So, what you could do is the following (not really a nice fix, but it will work for you):

Go to the controller file "accomodate.php" and find the method "request()". Put this code in top of this method:
Code:
public function request( $id = NULL )
{
    // Checking the $id argument, just a clean error handling here...

    if ( ! isset($_POST) )
    {
        $this->load->helper('url'); // If you autoload this helper, you can delete this line
        redirect('accomodate/request_quote/' . $this->uri->segment(3));
    }

    // Rest of the code here...
}

Note that this is not really a nice fix, it will work, but still...

If you wanna fix this the good way, just validate your form in the "request_quote()" method. Your choice Smile
#4

[eluser]Steffen Brem[/eluser]
Maybe it's better to post your controller code here, so we can take a look at it Smile




Theme © iAndrew 2016 - Forum software by © MyBB