browser won't render php code
Posted: 14. September 2010 01:50
new to apache, php and xampp. just intalled Xampp...i'm trying to run some sample code from the book i'm using to teach myself and it won't display correctly when opening the .php file in Firefox.
this is the code:
<?php
echo "<p>Order Processed</p>";
?>
for which the browser displays:
Order Processed
"; ?>
if i try:
<script language="php">
echo "<p>Order Processed</p>";
</script>
it displays nothing. also, when i try this:
<?php
echo "<p>Order processed on ";
echo date("H:i, jS F Y");
echo "</p>";
?>
the browser displays:
Order processed on "; echo date("H:i, jS F Y"); echo "
"; ?>
if a try the code above using the tag style <script>...</script> it also displays nothing.
what am i missing?
this is the code:
<?php
echo "<p>Order Processed</p>";
?>
for which the browser displays:
Order Processed
"; ?>
if i try:
<script language="php">
echo "<p>Order Processed</p>";
</script>
it displays nothing. also, when i try this:
<?php
echo "<p>Order processed on ";
echo date("H:i, jS F Y");
echo "</p>";
?>
the browser displays:
Order processed on "; echo date("H:i, jS F Y"); echo "
"; ?>
if a try the code above using the tag style <script>...</script> it also displays nothing.
what am i missing?