|
Posted by Treefrog on 03/23/06 18:25
universalbitmapper wrote:
> Hi,
> I'm trying a simple form.html that call a .html script that begins
> with:
>
> <?php
> header("This is a test");
> ?>
>
> When I click on the link, I get blank page.
>
> I tried every combination of .html and .php as extensions, none works.
Hmm.... To elaborate on the other reply slightly, header("Test"); will
output "Test" into the http headers. The headers are the bit that tell
the browser that it's about to receive a file or a web page etc and is
to all intents and purposes, invisisible to the end user. As a rough
rule, you wont need to use the header() function until you're fairly
advanced with PHP, with possibly the exception of header("Location:
anotherpage.htm"); that which redirects the browser to anotherpage.
If you want to display text to the user (browser) then use echo "Test";
Good luck.
Navigation:
[Reply to this message]
|