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

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -