HTML
Hi,
You said parameter, i will suppose you mean GET parameter as for the rest sorry but i didn’t understand it, something like that will do the job
<?php
if(isset($_GET['username'])) {
echo "<em>" . $_GET['username'] . "</em>";
}
?>
Ops for some reasons [‘username’] doesn’t appear after the $_GETs :p
If you make people think they’re thinking, they’ll love you. but if you really make them think, they’ll hate you.
~ Harlan Ellison
10 years ago
0
Hi @roun512
Does the above code works.
Hi @tlotr,
Yes my code works but the [ ‘name’ ] without spaces is not appearing (BBcode Problem) after the $_GETs :)
and @freewind1012, i didn’t understand the rest of the OP post :) but maybe he wants something like this :/
<?php
if(isset($_GET[ 'name' ])) {
if($_GET[ 'name' ] == 'hackthis') {
echo "<em>Geekard</em>";
}
}
?>
If you make people think they’re thinking, they’ll love you. but if you really make them think, they’ll hate you.
~ Harlan Ellison
Aah, now i understand.
That can be done Using sessions in PHP, for eample:
<em><font color = "40E0D0"><?=$_SESSION[ 'username' ];?></font></em>
If you make people think they’re thinking, they’ll love you. but if you really make them think, they’ll hate you.
~ Harlan Ellison
10 years ago
0
Can I also add that ANY user supplied data which is either stored in a database or output to page really needs to be cleaned to avoid SQLi and XSS injections.