Im trying to add a PHP variable to a href url
This is the code:
PHP
$uid= $_SESSION['userid'];
HTML
<a href=http://example.com/uid= <?php echo ".$uid."?> /a>
How do you add, when I do it, this is what it redirect too: http://example.com/uid=.
session_start()at the top of your script, and the syntax should look like<a href="http://example.com/uid=<?php echo $uid; ?>">...</a>hrefattribute in them)