09-25-04 07:48 AM
Nela wrote:
> Hi,
> maybe I am a bit boring to you all, as I am an absolute beginner, but, as
I
> now have my new toy up and running at home without having to go online, an
d
> Kev's manual beside me, the first few examples, with current date, hello
> world, etc, it all worked. Now when I tried the form, it doesn't work. The
re
> is no error shown in the browser, but just no firstname and lastname
> displayed when I enter it into the form. I tried it on my webserver who
> certainly has everything installed properly, and it doesn't work online
> either.
> CODE welcome3.php:
> <?php
> echo( "Welcome to my website, $firstname $lastname!" );
> ?>
PHP doesn't set up the variables quite like that, at least not by
default. Try this instead:
<?php
echo( "Welcome to my website, $_GET[firstname] $_GET[lastname]!" );
?>
If you want it to behave that way (it apparently did at one time), look
up register_globals in the config section, or import_request_variables
in the functions section. Either one can be used to reinstate this
behaviour.
--
Jim Patterson
Ottawa, Ont
CANADA
[ Post a follow-up to this message ]
|