Hi all,
Just found this site - hope you can help this newbi out.
I am just learning (or trying to) PHP. I have installed apache, php5, etc on my machine, and when i bring up a browser (firefox or ie) nothing seems to work.
Here is the simple code i copied from a tutorial...
<?php
$site_name = "This is the site name area";
$paragraph_text = "Welcome to my site";
$email = 'type me@email.com';
?>
<html>
<body>
<h2><?php echo $site_name; ?></h2>
<p><?php echo $paragraph_text; ?></p>
<p>Email me: <a href="mailto:<?php echo $email; ?>"><?php echo $email; ?></a>
</body>
</html>====================================================
When i try to run it, the only thing displayed is "Email me:" - without the quotes.
===========================================
When i display the page source (and correct me if i'm wrong, but the php code should not show up - it displays the following....
<?php
$site_name = "This is the site name area";
$paragraph_text = "Welcome to my site";
$email = 'type me@email.com';
?>
<html>
<body>
<h2><?php echo $site_name; ?></h2>
<p><?php echo $paragraph_text; ?></p>
<p>Email me: <a href="mailto:<?php echo $email; ?>"><?php echo $email; ?></a>
</body>
</html>========================================
I'm sure there's a very simple explanation for this, but it's my first ever try at doing anything on the web (been an application / system programmer for 35 years) and I'm at a loss.
Thanks in advance,
Q