I have a redirect PHP page which checks a URL Parameter and redirects to one of two pages depending on if the variable 'shore' is either 1 or not. My problem however, is that no matter what I do, the page is redirecting to the first option. Can anyone see anything obvious that I am missing?
Many thanks
<?php
require_once('Connections/ships.php');
if ($_GET['shore'] = "1") {
header( 'Location: shore_establishment.php?ship_id=' .urlencode($_GET['ship_id']) . "?shore=1");
//echo"first";
} else if ($_GET['shore'] = "0") {
header( 'Location: shipinfo.php?ship_id=' .urlencode($_GET['ship_id']). "?shore=0");
//echo"second";
};
?>