Re: Var question

From: Date: Thu, 24 Oct 2002 13:54:53 +0000
Subject: Re: Var question
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-121262@lists.php.net to get a copy of this message
is go a variable that is passed via post? I guess yes but you get this error without submitting yet. There are three solutions: 1. Change your error reporting level to 55: error_reporting(55). This will stop warning your undefined variables. 2. Prefix the variable with an at-mark: @$_POST['go']. This is a quickie. 3. Most elegant way: add one more check: if(isset($_POST['go']) and $_POST['go'] == 'add link'). -- Maxim Maletsky maxim@php.net www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home // my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3 "Clint Tredway" <ctredway@fishermenstudios.com> wrote... : > I am building a form that posts to itself. > > I have the following to detect the submit button being clicked: > If($_POST["go"] == "add link") > > I am getting a warning that says 'go' is undefined. How do I define > this? > > Thanks, > Clint > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#121262) next »