Click to See Complete Forum and Search --> : Empty variables


Anon
04-18-2002, 12:28 AM
I'm new to PHP,MYSQL, etc. Having some success when IIS 5.0 broke. Uninstalled, reinstalled and thought I was back in business. Pages that worked before now pass empty variables. I tried the following code just to make sure and it's empty also.
test1.html

<head>
<title>Untitled</title>
</head>
<body>
<form method=GET ACTION="test1.php">
Who is your favorite author?
<Input Name="Author" Type="text">
<br>
<br>
<Input TYPE=SUBMIT>
</form>
</body>


Test1.php

<head>
</head>
<body>
Your favorite author is:
<?php
echo $Author;
?>
</body>


Your favorite author is:

I have reset the ISAPI filter and extension mappings in IIS. I'm not against doing some research, but a hint would be deeply appreciated.

vincente
04-18-2002, 05:58 AM
the method you use requires that 'register globals' is "on" in php.ini

But I suggest you leave it the way it is and start using the proper method for accessing the vars:

$HTTP_GET_VARS['var_name']
or
$HTTP_POST_VARS['var_name']

That is much clearer and more secure than registering globals.

------
A forum, a FAQ, email notification, what else do you need?
Time to YAPF!: http://www.hvt-automation.nl/yapf/
------

Anon
04-18-2002, 08:09 PM
Okay-thanks much...good advice. I changed the php.ini just to check it out and it worked just fine.

progman
04-22-2002, 01:58 AM
Thanks, works like a champ.