From a noob - (PHP): Wordpress QR Code Widget
===

Basically, I've been trying to make a simple Wordpress widget that displays a QR code with the URL of the current page. I'm using a modififed version of the simple text widget that parses PHP too.

What I have so far:

        <?php
    public function the_permalink( $permalink ) {
    if ($permalink = '')
    echo '<img src="http://api.qrserver.com/v1/create-qr-code/?data=http://eternityofgamers.com/forums" alt="QR Code">'
    }else{
    echo '<img src="http://api.qrserver.com/v1/create-qr-code/?data='.$permalink.;
    }
    ?>

I'm pretty sure that I failed miserably with this, as I have very, very little knowledge of PHP.

the_permalink() is the Wordpress variable for the URL of the current page. 


