[resolved] Passing global variable from one function to another not working (2 posts)

  1. richarduk
    Posted 5 years ago #

    I'm setting up an options page and uploading an image which has to be validated.
    If there's an error I want to set a variable to pass to another function, but I can't get it to work at all.

    Essentially the code goes like this, where $banner_error is the global variable I'm trying to set. If I echo a message at that point instead of setting a variable then the message is echoed ('headers already sent' as well but that doesn't matter since I'm just testing):

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Original code from: http://blogs.sitepoint.com/wordpress-options-panel/

  2. richarduk
    Posted 5 years ago #

    Resolved. The functions weren't in the order I thought they were in ...

Topic Closed

This topic has been closed to new replies.

About this Topic