For some reason the PHP script that is embeded in my HTML file doesn't run on my computer.
So I have installed XAMPP, on Linux, using the instructions on this first question from this faq: https://www.apachefriends.org/faq_linux.html (Links to an external site.)Links to an external site.
I have set it up using the commands: /opt/lampp/lampp start
and I get the message back: Starting XAMPP for Linux 7.1.7-0... XAMPP: Starting Apache...ok. XAMPP: Starting MySQL...ok. XAMPP: Starting ProFTPD...ok.
I do not know why I get a message about starting PRoFTPD instead of PHP and I think that might be a part of it.
The following is my HTML file:
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset = "utf-8">
<title>CS80 Final</title>
<link rel = "stylesheet" type ="text/css" href = "final.css" />
<!-- <script type = "text/javascript">
</script> -->
</head>
<body>
<h1 id ="title"> <bold> Garden Exchange </bold> </h1><!-- Title of the page-->
<section> <!-- Section regarding making a selection -->
What type of plant are you looking for?
<input type = "text" id = "plant"/>
<input type = "button" id = "plantbutton" value = "Find plant"/><br>
<br/> <br/>
Looking to list a plant instead?
<input type = "button" id = "input button" value = "List a plant"/>
</section>
<?php
$nam = array("Bob", "Willow", "sagment lamp");
if (preg_match("/low/",$nam))
{
print ("<p> 'low' was found </p>");
}
?>
<section id ="listings" style: hidden="hidden">
</section>
<section id = "listing" style: hidden = "hidden">
</section>
</body>
</html>
I appreciate all the help I can get!