<a href="<?php echo $config_basedir;?>showcart.php?type=" . $type . >View Basket/Checkout</a>
Above mentioned link is called by header program . I want to pass the type value while calling the showcart.php. But its passing blank value.
EDIT
<?php $type=$_GET['type'];
echo "$type"; ?>
<a href="<?php echo $config_basedir; ?>">Home</a>
- <a href="<?php echo $config_basedir;?>showcart.php?type=" . $type . >View Basket/Checkout</a>
</div>
When you try to throw in the $type variable you do so from within the HTML context. You need to open php tags again and echo the $type variable where you need to
In result you will get:
<a href="<?php echo $config_basedir;?>showcart.php?type=<?php echo $type; ?>">View Basket/Checkout</a>
You might as well just do it all as one echo:
echo "<a href='{$config_basedir}showcart.php?type={$type}'>View Basket/Checkout</a>";
As you have it there are several syntax errors, such as no closing quote on your href attribute, and you are trying to concatenate with PHP outside of a PHP block.