i'm trying to use the $.get() command and something is getting lost in the server.
here is my jquery/axaj call to the server (and server-script)
$.get('putStatus2.php', { dataOut:0 } , processResponse);
and here is the server-script that is supposed to process the data
<?php
$data = $_GET['dataOut'];
mysql_select_db($database_connFtH, $connFtH);
$sql = "INSERT INTO cpqc_status (status_index) VALUES ($data)";
mysql_query( $sql ) or die( mysql_error() );
echo $data;
?>
the problem is that when i send dataOut:0 to the server script, then the server doesn't alway stuff the value into the DB. why?
i tried initiating the server-script from a url and setting the value of dataOut to 0 then 1 then 0 then 2 then....0,0,0,1,2,3,4,0,1,0,1....... and everytime, no matter what i send as the value of dataOut, the php script stuffs that value into the DB just fine,
BUT.....when i try to use the Jquery/Ajax call to do it, then it doesn't wont to work "sometimes". its crazy.
usine the Jquery/Ajax call to INSERT the values 0,1,2,3,.. and so on, it works fine, but when i go back to put in 0 it won't do it.
argh ! this is really frustrating.
i'm using IE7, maybe this $.get() doesn't work so good in IE7?
anyone have any ideas?
maybe i'm not setting up the Ajax command properly?
also, when i try to convert both sides (client-script/server-script) to $.post() and $_POST(), oh boy that wont work at all.
i have no idea what's wrong. according to all my references the syntax is correct. (maybe my references are wrong, but i don't think so)
would appreciate your input very much.
thanks,
Paul Williams