Still wondering why its not working.
echo "<a href=""$config_basedir. "/products.php?id=" . $catrow[">". $catrow['name'] . "</a>";}
I wanted to use a variable for the products.php?id=".
. Is there another way to solve this?
Use this...
$catrow_name = $catrow['name'];
$config_basedir = $config_basedir."/products.php?id=$catrow_name";
echo '<a href="'.$config_basedir.'">'.$catrow['name'].'</a>';
</div>
There is some issue in using quote in your code, please see the below code:
echo '<a href="'.$config_basedir.'/products.php?id='.$catrow['name'].'">'.$catrow['name'].'</a>';
You can get value of id
from URL as: $id = $_GET["id"];
You really don't need the "
. I think there is also a curly brace at the end of your which is also a possible problem. Kindly post the error php throws in your browser for more clarification