AJAX POST 500 Internal Server Error on hosting

M Argus Chopin Gyver

I'm develop something that need some data to load on AJAX (using POST method).

When I'm build the code on localhost (using XAMPP on Windows 7). It works pretty well.

But, when I'm moved the code to hosting server, It give me a 500 Internal Server Error..

Here's the code that send the AJAX Request

$.post("the-link-to-ajax-handler",
{ 
    //some parameter
    roomid : roomid,
    amenities : amenities,
},
function(data){
    //process that I do when ajax complete
}

And here's the AJAX Handler (using PHP)

$roomid      = mysqli_escape_string($conn, $_POST['roomid']);
$amenities      = mysqli_escape_string($conn, $_POST['amenities']);
echo $roomid."<br/>".$amenities;die();

*I'm trying to print the parameter but no luck, I'm still get the 500 Error

Screenshot of Network Panel from process on hosting enter image description here

And here's the Screenshot Network Panel from process on localhost (definitely with the same code) enter image description here

Karthikeyan Vivekanandhan

1) Are you missing any javascript plugin files or the plugin files path is not defined you faced the 500 internal server error.

2) Hosting server is Case Sensitive check the Variable values.

3) If you move to ajax before alerting the flow.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

TOP Ranking

HotTag

Archive