Im trying to send 2 variables to my php page via a link, i can't figure out what im doing wrong. The outcome is not right. Im expecting just the display of values and instead the whole php code displays.
Thanks for helping in advance, below is my html, php and result.
My html page is named "index.html" and my php "default.php"
HTML:
<!DOCTYPE html>
<html lang="sv">
<head>
<title>Information sänd via adressfältet och länkar</title>
<meta charset="UTF-8">
</head>
<body>
<a href="default.php?name=filip&gender=man">Link</a>
</body>
</html>
php:
<?php
header("Content-Type: text/plain");
echo $_GET["name"];
echo $_GET["gender"];
?>
Result:
<?php
header("Content-Type: text/plain");
echo $_GET["name"];
echo $_GET["gender"];
?>