0

I have created some Register Forms in my localhost. That Register form is working on my localhost and in another testing server.But when I deployed it in another server, then the post method is not working. I have used JavaScript for posting the form and I also tried with normal method using html on that server. Both method are not working on that server. In browser "Developer tools", in the "Console Window", the below error is displayed:

error: POST http://mycarer.com.au/db/complite_regi_db.php 403
(Forbidden)

Following is my JavaScript for the Registration form.

$(document).ready(function(){ 
        $('#basic_info_register').submit(function(e){
                e.preventDefault();
var val_form= $('#basic_info_register').serialize();
$.post('db/complite_regi_db.php',val_form,function(data){
               window.location.replace("finder_image_upload.php");
                });
      });
});

Please can some one give me any solution.

Shahzad Barkati
  • 2,532
  • 6
  • 25
  • 33
sanju
  • 41
  • 3
  • 2
    See this http://stackoverflow.com/questions/11423682/cross-domain-form-posting – cantelope Dec 22 '15 at 05:41
  • you are trying it to post to another server, may be jsonp can help you – Dimag Kharab Dec 22 '15 at 05:44
  • When i post it using simple HTML post method, i will get following error message.Forbidden "You don't have permission to access /db/complite_regi_db.php on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request" – sanju Dec 22 '15 at 06:07

1 Answers1

0

Does this page, http://mycarer.com.au/db/complite_regi_db.php allow POST request. From the 403 Forbidden error message, it looks like POST requests are not allowed.

Bala Sakthis
  • 664
  • 1
  • 8
  • 20
  • When i post it using simple HTML post method, i will get following error message.Forbidden "You don't have permission to access /db/complite_regi_db.php on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request" – sanju Dec 22 '15 at 06:07
  • then how can allow post method on this server?? – sanju Dec 22 '15 at 06:11
  • In the Web server, where http://mycarer.com.au/db/complite_regi_db.php is hosted, the POST method should be enabled. – Bala Sakthis Dec 22 '15 at 06:28