$_GET returns empty string

I’ve searched the forum using keyword $_GET but don’t find this symptom. So it’s probably a typo or some other embarrassing error.

In my calling html

<p id="addcomment"><a href="/comment/index.php?source="home">Add a Comment</a></p>

in my /comment/index.php

<!DOCTYPE html>
<html>
<body>
<!-- when running on localhost using xampp, mails will go to "C:\\xampp\\mailoutput folder" -->
<?php
$source = $_GET['source'];
var_dump($_GET);
...

When I “click” on the link to /comment/index.php?source=“home” the var_dump result is

array(1) { [“source”]=> string(0) “” }

So I am clearly going to the right place ( /comment/index.php) but why am I NOT getting

array(1) { [“source”]=> “home” }
?

I think your problem is the " they are ending the <a href before the home; I would change it to:

<a href="/comment/index.php?source=home">

yep. thanks