Change brand logo/text right inside the app

I want the site admin to be able to change the Brand /logotext right inside the app and not phpmaker. How can this be achieved . I was able to use

  $footerstring = ExecuteScalar("SELECT `text` FROM `portalfootertext` WHERE id=1");
     $this->setProjectPhrase("FooterText", $footerstring);

for footer text

The brand text/image is generated in the layout, you cannot change by server events, but you may change it by jQuery or JavaScript, also see Inspect HTML elements.