Need help with HTML form errors
Need help with HTML form errors
am 04.07.2010 10:30:21 von Nagendra Prasad
--001485e0b496aeaf45048a8ba27d
Content-Type: text/plain; charset=ISO-8859-1
Hi All,
I have this php form that I have inserted in the result page.
************************************************************ ************************************
Re: [PHP-DB] Need help with HTML form errors
am 04.07.2010 10:54:22 von Kesavan Rengarajan
Hi,
Those are notices not warnings(meaning they can be ignored sometimes,
search for error_reporting in the PHP manual).
In your example, if you do not wish ignore the notices, then
initialize the different variables to some value.
Sent from my iPhone
On 04/07/2010, at 6:30 PM, nagendra prasad
wrote:
> Hi All,
>
> I have this php form that I have inserted in the result page.
>
> ***
> ***
> ***
> ***
> ***
> ***
> ***
> ***
> ***
> ************************************************************ *********
>
Re: [PHP-DB] Need help with HTML form errors
am 04.07.2010 10:54:22 von Kesavan Rengarajan
Hi,
Those are notices not warnings(meaning they can be ignored sometimes,
search for error_reporting in the PHP manual).
In your example, if you do not wish ignore the notices, then
initialize the different variables to some value.
Sent from my iPhone
On 04/07/2010, at 6:30 PM, nagendra prasad
wrote:
> Hi All,
>
> I have this php form that I have inserted in the result page.
>
> ***
> ***
> ***
> ***
> ***
> ***
> ***
> ***
> ***
> ************************************************************ *********
>
AW: Need help with HTML form errors
am 04.07.2010 11:01:41 von harlequin2
Good morning Nagendra,
Nagendra wrote:
> ...
> The above code is giving me the following errors:
>
Notice: Undefined variable: filter in
> C:\wamp\www\5_Final\index.php on line 228
> Notice: Undifined Variable: filterfield in c:\wamp\www\5_final\index.php
on
> line 233 > Type
> ...
The error occurs because you did not initialize the $filter and $filterfield
variables before using them; this does not indicate an error because these
variables will most likely not be set when the form is displayed initially.
You have multiple options to avoid this error:
1) Change the error_reporting setting in your php.ini or set
"error_reporting (E_ALL & ~(E_STRICT|E_NOTICE));" inside your php script.
>> This disables PHP notices but could make debugging a bit more
complicated.
2) Initialize the variables before using them:
[CODE]
// I assume the variables will be passed by the form, that's why they are in
the
// superglobal $_POST array; if the variable has been passed (isset(...),
use it,
// otherwise initialize with false
$filter = isset($_POST["filter"]) ? $_POST["filter"] : false;
$filterfield = isset($_POST["filterfield"]) ? $_POST["filterfield"] : false;
[/CODE]
HTH!
Regards,
Sascha
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Need help with HTML form errors
am 04.07.2010 11:55:48 von Nagendra Prasad
--00163630f74d54d985048a8cd4ba
Content-Type: text/plain; charset=ISO-8859-1
Hi Everyone,
Sorry, I haven't mentioned in my earlier mail that the variables $filter and
$filterfield are global variables which I already defined.
Best,
Guru.
--00163630f74d54d985048a8cd4ba--
Re: [phpXperts] Need help with HTML form errors
am 04.07.2010 17:09:59 von Nurul Abser
--00032557459edfb9f3048a91378c
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
Dear coder,
New version of php give php Notice if the script contain any variable which
has not value. Please debug your script by printing the varible and confirm
that the varible got value.
Thanks
Abser
On Sun, Jul 4, 2010 at 4:30 PM, nagendra prasad w=
rote:
>
>
> Hi All,
>
> I have this php form that I have inserted in the result page.
>
>
> ************************************************************ *************=
***********************
>
Re: [phpXperts] Need help with HTML form errors
am 04.07.2010 17:09:59 von Nurul Abser
--00032557459edfb9f3048a91378c
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
Dear coder,
New version of php give php Notice if the script contain any variable which
has not value. Please debug your script by printing the varible and confirm
that the varible got value.
Thanks
Abser
On Sun, Jul 4, 2010 at 4:30 PM, nagendra prasad w=
rote:
>
>
> Hi All,
>
> I have this php form that I have inserted in the result page.
>
>
> ************************************************************ *************=
***********************
>
Re: [PHP-WIN] Re: [phpXperts] Need help with HTML form errors
am 04.07.2010 18:39:02 von Phansys Corp
--001636b2b88e2a647b048a9275ca
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
Try the next verification to see what's the var
var_dump($_POST['filter']);
} ?>
Best regards.
2010/7/4 Nurul Abser
> Dear coder,
>
> New version of php give php Notice if the script contain any variable whi=
ch
> has not value. Please debug your script by printing the varible and confi=
rm
> that the varible got value.
>
> Thanks
>
> Abser
>
> On Sun, Jul 4, 2010 at 4:30 PM, nagendra prasad
> >wrote:
>
> >
> >
> > Hi All,
> >
> > I have this php form that I have inserted in the result page.
> >
> >
> >
> ************************************************************ *************=
***********************
> >
Re: [PHP-WIN] Re: [phpXperts] Need help with HTML form errors
am 04.07.2010 18:39:02 von Phansys Corp
--001636b2b88e2a647b048a9275ca
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
Try the next verification to see what's the var
var_dump($_POST['filter']);
} ?>
Best regards.
2010/7/4 Nurul Abser
> Dear coder,
>
> New version of php give php Notice if the script contain any variable whi=
ch
> has not value. Please debug your script by printing the varible and confi=
rm
> that the varible got value.
>
> Thanks
>
> Abser
>
> On Sun, Jul 4, 2010 at 4:30 PM, nagendra prasad
> >wrote:
>
> >
> >
> > Hi All,
> >
> > I have this php form that I have inserted in the result page.
> >
> >
> >
> ************************************************************ *************=
***********************
> >
Re: Need help with HTML form errors
am 04.07.2010 21:55:15 von jesus
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/04/2010 03:30 AM, nagendra prasad wrote:
> Hi All,
>
> I have this php form that I have inserted in the result page.
>
> ************************************************************ ************************************
>