Hey, htmlentities doesn't work in this code of mine, someone know why?
Check line 11-14
Thanks.
<html>
<head>
<title> Welcome <?php echo $_GET['name']; ?> </title>
</head>
<body bgcolor="<?php echo $_GET["favcolor"]; ?>"?
<h1> Welcome <?php echo $_GET['name']; ?> </h1> <br />
<?php
foreach ($_GET as $key => $verdi) {
$verdi = htmlentities($verdi);
$key = htmlentities($key);
}
echo "You live in ";
echo $_GET['country'];
echo ", ";
echo $_GET['city'];
echo " And your favorite color is ";
switch ( $_GET['favcolor'] ) {
case "#ff0000";
$favcolortext="Red";
break;
case "#8bcdff";
$favcolortext="Blue";
break;
case "#fff600";
$favcolortext="Yellow";
break;
case "#0cff00";
$favcolortext="Green";
break;
case "#a200ff";
$favcolortext="Purple";
break;
case "#6000ff";
$favcolortext="Violet";
break;
case "#ff68e1";
$favcolortext="Pink";
break;
case "#fbfadd";
$favcolortext="Vanillia";
break;
case "#730404";
$favcolortext="Dark Red";
break;
case "#10057a";
$favcolortext="Dark Blue";
break;
case "#157a05";
$favcolortext="Dark Green";
break;
case "#17bb9e";
$favcolortext="Cyan";
break;
case "#40f0fb";
$favcolortext="Baby Blue";
break;
}
echo "$favcolortext.";
?>
</body>
</html>
Anyone wants to add me to msn? mzm_mc@hotmail.com
good coder or not, IDC. Just need some coding buddies =)