I recently started reading PHP & MySQL Novice to Professional by Kevin Yank. I ran into a problem on the second example I attempted to use in the book.

So this is what I tried to do:

HTML Code:
<a href="name.php?firstname=Kevin&amp;lastname=Yank">Hi, I&rsquo;m Kevin!</a>
I'm trying to send firstname and lastname to $_GET, which the file name.php will handle. Which is located in the same folder.

Here's the PHP:

PHP Code:
<?php
$firstname 
$_GET['firstname'];
$lastname $_GET['lastname'];

echo 
'Welcome to our website, ' htmlspecialchars($firstnameENT_QUOTES'UTF-8') . ' ' htmlspecialchars($lastnameENT_QUOTES'UTF-8') . '!';
?>
The output looks like this:

Notice: Undefined index: firstname in C:\apache\htdocs\Novice2Professional\HTMLandPHP\name.php on line 2

Notice: Undefined index: lastname in C:\apache\htdocs\Novice2Professional\HTMLandPHP\name.php on line 3
Welcome to our website, !

I think the problem is with the &amp; in the HTML. I could send one value just fine.