html - How to add PHP variables to a href url -
im trying add php variable href url
this code:
php
$uid= $_session['userid'];
html
<a href=http://example.com/uid= <?php echo ".$uid."?> /a>
how add, when it, redirect too: http://example.com/uid=.
try this,
<?php @session_start(); $uid= $_session['userid']; ?> <a href="http://example.com/?uid=<?php echo $uid; ?>" >your link text</a>
Comments
Post a Comment