I started doing the Kevin Yank Build Your Own Database Driven Web Site using PHP & MySQL tutorials at http://www.sitepoint.com/php-amp-mysql-1-installation/
I already had WAMP up and going and then successfully logged onto mysql and started setting up the minimal joke database. Everything was working as expected but when I got to chapter 3 introducing php and I made the welcome1.php and welcome1.html files I struck a problem. When I opened welcome.php in localhost all I got on the resulting webpage was “Hi, I’m Kevin!” not “Welcome to our website Kevin!” Also the “Hi, I’m Kevin!” shows up as a link and if I click on it I’m lead to an address http://localhost/welcome1.php?name=Kevin page in localhost with the correct text displaying.I have obviously misinterpreted the instructions on how to make the two welcome1 files. This is what I have for welcome1.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>html welcome</title>
<meta http-equiv="content-type"
content="text/html; charset=utf-8"/>
</head>
<body>
<a href="welcome1.php?name=Kevin">Hi, I’m Kevin!</a>
</body>
</html>
and welcome1.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>php welcome</title>
<meta http-equiv="content-type"
content="text/html; charset=utf-8"/>
</head>
<body>
<?php
$name = $_GET['name'];
echo 'Welcome to our web site, ' . $name . '!';
?>
</body>
</html>
Can someone please tell me where I went wrong Thanks Pedro.
Edit - I have just re-read the instructions and I now think that it is working exactly as intended but I wouldn’t mind some verification of this is someone might be kind enough to offer
Thanks