If you're getting errors for undefined variables, you can reduce the level
of error reporting in PHP.ini so it only does so for more serious errors. I
had a similar problem and this cleared things up. See the PHP manual...

http://www.php.net/manual/en/ref.errorfunc.php#ini.error-reporting

Also, I don't recommend using the extract($_POST) command as a way around
register_globals being off, it kind of defeats the purpose. Better to grab
only those variables you need like this:

$formvals = $_POST['my_formvals'];

I put all form values into an array so I only have to grab one POST
variable. It makes it a little easier. Also be sure to clean the data with
some kind of function that uses strip_tags() and similar functions.

Monty 
 

> From: [EMAIL PROTECTED] (ØYstein HåLand)
> Newsgroups: php.general
> Date: Tue, 3 Jun 2003 18:44:30 +0200
> To: [EMAIL PROTECTED]
> Subject: Re: Migration from register_globals=on to register_globals=off
> 
> I tried changing my code to (since the variable $printout in this case is
> sent with GET)
> ($_GET['printout'] != "yeah") { include("header.php"); }
> and got the following error:
> Undefined index: printout
> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to