Variable won't show

Discussion in 'PHP' started by Silver89, Aug 19, 2008.

  1. #1
    Hi,

    I'm using php to send data back to an actionscript, The actionscript is recieved the data but there's a problem within the php page.

    Please view this screenshot:
    http://mostplays.com/confused.png

    The problem is $diff $lev won't show up within $phrase

    $diff is 100% set because it's used succesfully in the mysql_query

    $rank passes through to the actionscript aswel so you can see that is working.

    Anyone see the problem?
     
    Silver89, Aug 19, 2008 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Set these lines at the very top of your script:
    
    error_reporting(E_ALL);
    ini_set('display_errors', '1');
    
    PHP:
    ... then open the page in your web browser, as I'm sure your Actionscript won't display the errors you might get.

    EDIT:

    Just a thought, but try removing the single quotes. If that doesn't work either, try using rawurldecode() on the string before echoing it.
     
    nico_swd, Aug 19, 2008 IP
  3. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #3
    The only way I can get it to work is to replace this:

    $diff = $_POST[diff];

    with

    $diff = 1;

    But it has to be working because the query uses $diff further down. I really can't figure this out, been going at it for an hour now with no luck at all.
     
    Silver89, Aug 19, 2008 IP