Hi, It is because of NOTICE is 'on' in your php.ini file. To remove the displaying of these errors, Open your php.ini file and serach 'error_reporting'. It may appear more than once. And make a change in the last result as "error_reporting = E_ALL & ~E_NOTICE" and after that restart apache.
Regards, Roshith Kaniyamchalil iScripts Developer --- [EMAIL PROTECTED] wrote: > ----- Original Message ----- > From: "Brian E Boothe" > > dang it here we go again: > I'm getting these errors AGAIN !! on my PHP > page: how do i get > these NOT to show up and my code Actually WORKS!!!! > using *PHP* > *ver*. 5.1.6 > > > Notice: Undefined variable: submit in > c:\Inetpub\wwwroot\helpdesk.php > on line 61 > > Line 61 is > if ($submit) { > > and we have > > Notice: Undefined variable: add in > c:\Inetpub\wwwroot\helpdesk.php > on line 68 > > Line 68 is > if ($add) { > > Notice: Undefined variable: PHP_SELF in > c:\Inetpub\wwwroot\helpdesk.php > on line 86 > Line 86 is > echo "<form method='post' > action='$PHP_SELF'><br>\n"; > ** > ----------------------------- > > Hi Brian, > It sounds like your server previously > had REGISTER_GLOBALS > enabled and it has been disabled. > > REGISTER_GLOBALS is NOT enabled by default with all > php 5.x.x versions as it > is a security risk. > > The setting is in php.ini and this may not be > accessible to you on a shared > server. I some cases you can copy php.ini into your > local directory on the > server so that you can make changes that only effect > your site. > > In any case it is probably better to change the > script rather than the php > settings. > > GLOBALS can be from a number of sources such as > $_GET, $_POST $_COOKIE or > environment variables like PHP_SELF. When > REGISTER_GLOBALS is enabled > something like $_POST['submit'] can be access in php > with $submit > > When REGISTER_GLOBALS is NOT enabled then you have > to transfer the values of > these items into php manually. > > Transferring the value (or existence) of a submit > button in a html form can > be done like this - > > if(isset($_POST['submit'])) > { > $submit = $_POST['submit']; > } > else > { > $submit = FALSE; > } > > ....... > then later in the script you can do things such as - > > if($submit){.... > > PHP_SELF is an environment variable so you can't do > the same with it. > Just use $_SERVER['PHP_SELF'] instead > > A good way to do this for many items may look like > this - > > $globs = 'username password age submit'; > $globs = explode(' ', $globs); > foreach($globs as $glob) > { > $$glob = $_POST'[$glob]; > } > > A nasty way to this that is only good for > diagnostics is - > > foreach($_POST as $glob) > { > $$glob = $_POST[$glob]; > } > > Hope this helps, Rob. > > Did you know? You can CHAT without downloading messenger. Go to http://in.messenger.yahoo.com/webmessengerpromo.php/