appending php variables to a html url

I have 2 php files located at
(code for both files below)
when the link on is used it sends a predefined query string to
the secondpage.php file creates a variable "coordinates" from the query string.
I now want  to append that data (which is a set of google gps coordinates) to a html url on the same page. I'm having difficulty appending this data which should end up creating the following url; -6.274996866083001

Ive tried  putting in on secondpage.php
<a href="<?php $_GET['q'] ?> " > Current Location < /a>
put it completely ignores the php
how can i reference the contents of the coordinates variable from within the html url?
thanks ...first time with php and html here...go easy!!!
		<title>First Page</title>
		<a href="secondpage.php?q=53.290208540067006 -6.274996866083001" >send url from phone simulation

		<title>Second Page</title>
         $coordinates = $_GET['q'];
          echo " <br /> $coordinates ";
          <a href=" " >Current Location

Open in new window

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Change the embedded PHP statement to this:

<?php echo $_GET['q'] ?>

Without the echo command, PHP doesn't do anything with the value of the $_GET['q'] variable.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mark BradyPrincipal Data EngineerCommented:
On line 18 you capture the information in the  $coordinates variable so you can use that in your link like this:

<a href="<?php echo $coordinates;?>Current Location</a>

Like HackneyCab said, if you don't use "echo" before the variable you want to insert it will do nothing.
blossomparkAuthor Commented:
thanks HackneyCab!! works 100% !!
blossomparkAuthor Commented:
thanks Elvin66...sorry only noticed your reply after having responded to HackneyCab
Mark BradyPrincipal Data EngineerCommented:
No problem
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.