I.E.
This is my base url.Instead of having to go through every page and manually change the links, I think it would be easier to just add a base_url in.
Code: Select all
<?php
$base_select = "SELECT value FROM `SHN_config` WHERE `option` = 'base_url'";
$ps = $pdo->query($base_select);
?>
<input type="hidden" name="base_url" value="<?php echo $ps->fetchColumn(); ?>" />
I have tried this, but it doesn't appear to work.
Code: Select all
<?php
$base_select = "SELECT value FROM `SHN_config` WHERE `option` = 'base_url'";
$ps = $pdo->query($base_select);
?>
<input type="hidden" name="base_url" value="<?php echo $ps->fetchColumn(); ?>" />
<?php $base_url = (isset($_POST['base_url'])) ? ($_POST['base_url']) : '' ; ?>
//Link
<li><a href='<?php echo $base_url; ?>about/'>About</a></li>