I currently have this as a jQuery function:
function postActivity() {
if($('#statusUpdate').val('').length > 0 && $('#statusUpdate').val('').length <= 160) {
$.post("process.php?type=postActivity", $("#statusForm").serialize(),
function(data){
if(data == 'success') {
$('#statusUpdate').val('');
$('#submitUpdate').attr('disabled', 'disabled');
} else {
$('#statusUpdate').val(data);
}
});
}
}
Then I have this as the php code in process.php:
if($_GET['type'] == 'postActivity') {
if(strlen($_POST['statusUpdate']) > 0) {
echo $_POST['statusUpdate'];
} else {
echo 'What are you doing? ' . strlen($_POST['statusUpdate']);
}
} else {
echo 'Invalid Process';
}
I've viewed $("#statusForm").serialize()'s output, and it is passing statusUpdate, but the PHP doesn't seem to be able to access it via $_POST.
The strlen always returns 0, and when I try just printing $_POST['statusUpdate'], it doesn't return anything.
The output I'm continuing to get is: What are you doing? 0
Can anyone help with this? I have absolutely no idea why this isn't working.
Thanks in advance for any help!

New Topic/Question
Reply



MultiQuote


|