Ok so I'm writing a new script to release for free. I am not good at php but I have managed to write a functional script that isn't causing errors.
Now... in the config file I have
So basically if someone selects 0 i want the $sitelogo to not display and if they select 1 I want it to show up.
Here is my code:
For some reason it only displays the Else Echo regardless of if I set it to 0
Feel free to flame but hopefully amongst the spinning dicks someone can help me. I'm sure this is some very basic beginner stuff but I can't find anything on it.
Now... in the config file I have
PHP:
$sitelogo = 'URL To image/logo'; // This is subject to the actual location of your logo / header
$showimg = '0'; // 0 hides the logo, 1 shows the logo
Here is my code:
PHP:
<?php
if ($showimg = 0) {
echo "<h1>$sitename</h1>";
} else {
echo "<h1>$sitename<br /><img src='$sitelogo'></h1>";
}
?>
For some reason it only displays the Else Echo regardless of if I set it to 0
Feel free to flame but hopefully amongst the spinning dicks someone can help me. I'm sure this is some very basic beginner stuff but I can't find anything on it.