You are here: Re: Undefined Index notices « PHP Programming Language « IT news, forums, messages
Re: Undefined Index notices

Posted by Craig Morrison on 06/09/06 13:09

Markus Ernst wrote:
> Craig Morrison schrieb:
>> I'm getting this:
>>
>> [client 192.168.5.50] PHP Notice: Undefined index: D1 in
>> /var/www/html.....
>>
>> From this line of code:
>>
>> $id_option = $_POST['D1'];
>>
>> Which is posted by this:
>>
>> <form target="_blank" method="POST" action="mailchart.php"
>> name="mail_data">
>> <input type="hidden" name="D1" value="<? echo $id_option; ?>">
>> <input type="submit" value="View Chart"></p>
>> </form>
>>
>> My question is why?
>>
>> I *am* getting the correct value for $_POST['D1'] and at this point in
>> time am really quite confused because that notice is getting thrown.
>
> Have you checked this, i.e. with print_r($_POST) or var_dump($_POST)? In
> such cases I usually try this first; if $_POST['D1'] is set at the top
> of the script you might find out where it gets lost.
>

The question is, if it's invalid how come I am getting the correct value
that is POSTed to the script?

Craig

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация