Hi. I don't seem to have simple PHP things working right for me.
Please check to see if it works for you
http://66.71.52.150/hello.php
source:
<head><title>PHP Test</title></head>
<body>
<?php echo "Hello World<p>Does anyone else love the song, Automatic by Utada Hiraku?";
echo $HTTP_USER_AGENT;
if(strstr($HTTP_USER_AGENT,"MSIE")) { echo "You are using Internet Explorer<br>";
}
?>
<?php
if(strstr($HTTP_USER_AGENT,"MSIE")) {
?>
<center><b>You are using Internet Explorer</b></center>
<?
} else {
?>
<center><b>You are not using Internet Explorer</b></center>
<?
}
?> <?
// create count.txt, embbed the script to your .php file
?>
was tracked <?
$file = fopen("/location/of/count.txt","r+");
$counter = fread($file, filesize("/location/of/count.txt"));
fclose($file);
$counter +=1;
$file = fopen("/location/of/count.txt","w+");
fputs($file, $counter);
fclose($file);
?>
<? include("/location/of/count.txt"); ?> visitors. <?php echo "Hello World<p>Does anyone else love the song, Automatic by Utada Hiraku?"; ?>
<form action="action.php" method="post">
Your name: <input type="text" name="name">
You age: <input type="text" name="age">
<input type="submit">
</form>
</body>
It should work right, but when it goes to action.php, it does not show the data you inputed...
Is there something wrong with my code? my browser, my server?
I just installed php and was testing it.
The info test works though:
http://66.71.52.150/phpinfo.php
Please help. Thanks.
James