[jQuery] Unexpected $.post behavior on receiver page

[jQuery] Unexpected $.post behavior on receiver page


This is really weird. I think it has something to do with our Apache
configuration but I'm not sure, I've done a lot of hunting but am
still unable to resolve.
We just moved from a PHP4 webserver to PHP5. The page that listens to
my ajax queries (ajax.php) no longer is able to acquire or see data
from post, I'm sure it's a configuration thing, but I can't seem to
find it. GET works fine, but in this instance I gotta use post
because there's a potential for a ton of data to come to this page.
Here's my code that I'm ajaxing with:
<code>
$.ajax(
{
    type: "POST",
    url: "ajax.php",
    data: "UANetID=<?=$authUser;?>&endYear[]="+arr_endYear
+"&endDay[]="+arr_endDay+"&endMonth[]="+arr_endMonth
+"&endMinute[]="+arr_endMinute+"&endHour[]="+arr_endHour
+"&startMinute[]="+arr_startMinute+"&startHour[]="+arr_startHour
+"&startYear[]="+arr_startYear+"&startDay[]="+arr_startDay
+"&startMonth[]="+arr_startMonth+"&taskDescr[]="+arr_taskDescr,
    success: function()
    {
        alert( "call back");
    }
</code>
Here's the code on ajax.php that listens for POST, builds a query and
fires it.
<code>
$UANetID = $_POST['UANetID'];
$startYear = $_POST["startYear"];
$startMonth = $_POST["startMonth"];
$startDay = $_POST["startDay"];
$startMinute = $_POST["startMinute"];
$endYear = $_POST["endYear"];
$endMonth = $_POST["endMonth"];
$endDay = $_POST["endDay"];
$endMinute = $_POST["endMinute"];
$taskDescr = $_POST["taskDescr"];
$sql_insert = "insert into residence_life_summer_tasks
(UANETID,DTTM_START,DTTM_END,DESCR_LONG,DTTM_ENTERED) values ";
$validRecordCount = 0;
for ($v = 0;$v<=sizeof($taskDescr)-1;$v++)
{
    if($taskDescr[$v]!="")
    {
        $validRecordCount++;
    }
}
for ($x=0;$x<=$validRecordCount;$x++)
{
    $endHour = $_POST["endHour"][$x];
    $startHour = $_POST["startHour"][$x];
    $dttm_start = "'".$startYear[$x]."-".$startMonth[$x]."-".
$startDay[$x]." ".$startHour.":".$startMinute[$x].":00'";
    $dttm_end = "'".$endYear[$x]."-".$endMonth[$x]."-".$endDay[$x]." ".
$endHour.":".$endMinute[$x].":00'";
    $lineTerminator = ($x==$validRecordCount-1)?";":", ";
    if($taskDescr[$x]!="")
    {
        $sql_insert .= "('".$UANetID."',".$dttm_start.",".$dttm_end.",'".
$taskDescr[$x]."',now())".$lineTerminator."\r\n";
    }
}
echo "<response post=\"".sizeof($_POST)."\">".mysql_query
($sql_insert)."</response>";
</code>
Any thoughts on what I'm doing wrong here?



































































    • Topic Participants

    • email