You are here: Re: Problem while accesing $_POST « All PHP « IT news, forums, messages
Re: Problem while accesing $_POST

Posted by J.O. Aho on 01/31/06 15:57

Leszek wrote:
> Hi.
>
> I have a problem with a form.
> There are some select dropdown lists
> for($i=0;$i<=$nrooms;$i++)
> {
> echo "<option value=\"$i\"";
>
> if($_POST[$dane[$idhotelu]['zamow'][$k]]==$i){ // $k is
> incremented in other loop
> echo" selected";
> }// endif
> echo">$i</option>\n";
> }//endfor
> echo"</b></select></td>";
>
> Trouble is that after reloading this form if condition is true for $i==0
> even if $dane[$idhotelu]['zamow'][$k] is not zero
>
> I think i'm making a mistake while accessing $_POST array but i' don't know
> where

Reloading don't always result in a repost, which makes that the $_POST would
become empty. Do add a print_r($_POST) to see if your value still is there.


//Aho

 

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

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