I am trying to include a php variable inside this php script that displays an html link. What i need is to include my php $row['vin'] variable in the href html link after the ? to pass a value to the page i am linking to. Top code block works but i still need that php variable, bottom is an example of what ive tried which will not work.
Works but missing my php variable:
<?php if($row['instock'] == "Yes")
{
echo '<a href="orderForm.php?">
<span class="glyphicon glyphicon-plus" aria-hidden="true">
</span>
</a>';
}
?>
Does not work:
<td>
<?php if($row['instock'] == "Yes")
{
echo '<a href="orderForm.php?'. $row['vin']">
<span class="glyphicon glyphicon-plus" aria-hidden="true">
</span>
</a>';
}
?>
</td>