mardi 30 juin 2015

Header location php

I've made this block of code:

$tag = $_GET['tag']

if ($_SERVER[HTTP_REFERER'] == 'http://ift.tt/1C5WAC8' ||       $_SERVER['HTTP_REFERER'] == 'http://ift.tt/1CHqG9W' . $tag ) : ?>

<figure class="folio-item">
    <img src="<?php echo $mod->src; ?>" alt="">
</figure>

<?php  else : ?>
   <?php header('http://ift.tt/1C5WAC8'); ?>
<?php endif ?>

So if the statement is true it has to make the figure, which does work. but when the statement isn't true it gives me a empty file instead of heading me to http://ift.tt/1C5WAC8

how can i make this work?

Aucun commentaire:

Enregistrer un commentaire