Welcome Guest, Not a member yet? Register   Sign In
Error: The URI you submitted has disallowed characters
#1

[eluser]Krystian[/eluser]
Hi,

I've coded sending messege to mail address from website using post in jQuery.

So, I`ve got a form and js like this:

Code:
var fc_name = $('#fc_name').val();
     var fc_company = $('#fc_company').val();
     var fc_phone = $('#fc_phone').val();
     var fc_email = $('#fc_email').val();
     var fc_text = $('#fc_text').val();
     //alert("Zapytanie od: " + fc_name); // for debug
    
     $.post
     (
    
      "<?php echo base_url(); ?>main/send_message",
      
      {
       // post_name:variable_value
      
       fc_name:fc_name,
       fc_text:fc_text
      },
      
      // re show the horizontal menu preview
      function(response){
      
       $('#message_result_box').val("Message has been sended :)");
      
      
      }
    
     )

and the controller method to which I`m sending post from js

Code:
function send_message()
{
  $this->load->library('email');

  $this->email->to('[email protected]');
  $this->email->from('[email protected]');
  $this->email->subject('Here is your info ' . $_POST['fc_name']);
  $this->email->message('This is the text message from website ' . $_POST['fc_text']);
  $this->email->send();
  
}

and in fire bug I`m getting
The URI you submitted has disallowed characters.

I`m using the newest ver of CI

p.s. when I run the controller method from url it sending mail without post vars of course.



Messages In This Thread
Error: The URI you submitted has disallowed characters - by El Forum - 02-26-2012, 01:46 PM
Error: The URI you submitted has disallowed characters - by El Forum - 02-26-2012, 02:06 PM
Error: The URI you submitted has disallowed characters - by El Forum - 02-26-2012, 02:11 PM
Error: The URI you submitted has disallowed characters - by El Forum - 02-26-2012, 02:25 PM
Error: The URI you submitted has disallowed characters - by El Forum - 02-26-2012, 02:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB