Flash ignoring vars sent from PHP!

Hi,
I am having a serious prob getting flash to read a var sent by php, there is a thread HERE that addresses the same problem, but after following that I still cannot get the thing to work, so without further ado her is my code


<?php
include("connect_1.php");

$pWord = $_POST['pWord'];



$query = "SELECT name,entryCount FROM $table WHERE pWord = '$pWord'"; 
$result=mysql_query($query); 
if(mysql_num_rows($result)){ 
      $row=mysql_fetch_array($result); 
      $name=$row['name']; 
      $entryCount = 1;

      echo '&name=' . urlencode($name);
      print '&entryCount='.urlencode($entryCount);
} 
else
{
    $entryCount = 2;
    echo '&entryCount='.urlencode($entryCount);
} 
mysql_close($link);
?>

All the above works well the DB is read and the vars are passed back to Flash - I have used dtb’s and trace to check this
My Flash code is
[AS]
function bsReg()
{
entryLVs = new LoadVars()
entryLVs.pWord = pWord.text;
entryLVs.onLoad = function(success)
{
if(success)
{

name = this.name;
entryCount = this.entryCount;
//this if statement is being complmetely iignored
if(entryCount == 1)
{
//do something
}
else if(entryCount == 2)
{
//do something else;
}

}
}
entryLVs.sendAndLoad(“scripts/BSentry.php”, entryLVs, “POST”);
}[/AS]

Anyway thats about it, simple enough, nothing complicated, but the if statement is just not being read, I have tried everything and it is driving me nuts, any help greatly appreciated

Cheers

SteveD