I installed wamp server on my windows 7 machine. It shows that all the services are running. It has Apache running, PHP running and also MySQL. I have the latest Chrome browser installed.
I am trying to run the following code on the website, but I just get the basic html page without the PHP script.
Here is my code:
<html>
<head>
<title>Php Tutorial</title>
</head>
<body>
<h3>Php tutorials</h3>
<hr>
<a href="?page=home">Home</a>
<a href="?page=tutorial">Tutorials</a>
<a href="?page=about">About</a>
<a href="?page=contact">Contact</a>
<hr>
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
echo "testing";
print_r($_REQUEST);
?>
</body>
I looked around and they suggested me to install PHP, Apache and MySQL. I have all three running with phpMyAdmin using wamp server. What am I missing?
I fixed the issues with testing being regarded as not a string and added error reporting, but I still don't see testing being displayed on the webpage.
<?phptagerror_reporting(E_ALL); ini_set('display_errors', 1);You have an unset constant (testing) and no$_REQUESTarray to see, Enclosetestinin quotes and get rid of theprint_r()statement.testingis being treated as a constant. Right Sam? - @JayBlanchard.phpand how are you accessing it? ashttp://localhost/file.phpor asfile:///file.php?