Jump to content

AJAX Mysql Update Not Posting - HELP!


ipwnzphp

Recommended Posts

I am using thjis ajax code but its not posting to my database, the function is being called fine. but its just not posting to the db.

 

function userTyping() {
receiveReq.open("POST", 'getChat.php?chat=1&typing=1', true);
var param = 'action=typing';
receiveReq.send(param);
}

 

here is the php code it is calling

 

// User is typing storage! 
if($_POST['action'] == 'typing') {
$sql = "INSERT INTO simp_live_typing_status (s_id, typing) VALUES (" . db_input($_POST['sid']) . ", '1')";
db_query($sql);
}

 

:-[

Link to comment
https://forums.phpfreaks.com/topic/168065-ajax-mysql-update-not-posting-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.