Welcome Guest, Not a member yet? Register   Sign In
Posting data from my controller to another site when submitting
#1

[eluser]Unknown[/eluser]
In our website there is a page for customer feedback. In this page user can give feedback/suggestions/bugs etc and submit the form.

From the view file the user submitted data is posted to the submit function inside my controller.
The controller will validate the data and will pass the data to another site (URL) which runs as a bug tracker.

IF the validation is successful, the user must see the notification that data is successfully submitted in the same feedback page.
That is the user must not know about what happens internally.

The current problem is that, i am able to fetch the post data from feedback page and validate the data.
After the validation how can i send/post the validated data to URL on which the bug tracker is running and then show the success notification in the feedback page.
#2

[eluser]vrencianz[/eluser]
Maybe this helps: http://wezfurlong.org/blog/2006/nov/http...hout-curl/
#3

[eluser]Reneesh T K[/eluser]
I think you need to use jquery or ajax for it. Using them, we can submit to other site and can return a value like the following:

Code:
jQuery.ajaxSetup({async:false});

jQuery.post("www.abc.com/test.php",{field1:value1,field2:value2}, function (data){
       document.getElementById("success_div")[removed]=data;
      
});




Theme © iAndrew 2016 - Forum software by © MyBB