You are here: Re: [PHP] post and variables « PHP « IT news, forums, messages
Re: [PHP] post and variables

Posted by "Richard Lynch" on 11/10/05 23:25

On Thu, November 10, 2005 4:39 am, Ross wrote:
> Thanks fpr all the feedback on the password but I have another one...
>
> How do I use $_POST with variables. Cant find an example of this
> anywhere on
> php.net
>
>
> if ($_POST['$table_name== 1']) {

I believe you want this:

if (isset($_POST[$table_name]) && ($_POST[$table_name] === '1')){
}

It is also remotely possible, however, that you want:

if (isset($_POST[$table_name]) && ($table_name === '1')){
}

This second one would assume that you have previously set $table_name
to some value earlier in this same script, rather than are getting it
from POST data... It's really unlikely that's what you want, though,
and it's probably code that should be re-factored in the first place,
even if it is what you want.

--
Like Music?
http://l-i-e.com/artists.htm

 

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

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