Web Servers on Windows - Re: apache on win98 Code mistake?

This is Interesting: Free IT Magazines  
Home > Archive > Web Servers on Windows > September 2004 > Re: apache on win98 Code mistake?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: apache on win98 Code mistake?
Jim Patterson

2004-09-25, 2: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, and
> 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. There
> 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
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com