You are here: Re: [PHP] Re: Set variable outside of scope (redo) « PHP « IT news, forums, messages
Re: [PHP] Re: Set variable outside of scope (redo)

Posted by comex on 10/04/94 11:36

> > if ($row[range] != "")
This should be $row['range'], not $row[range], although it doesn't
make a difference unless you define a constant named range.


Your problem isn't actually scope, it's that your PHP script is being
called twice. Once to show the form, once to submit it. The second
time, your script doesn't have any of the things you set the first
time.

<input type=\"hidden\" name=\"id\" value=\"$row[id]\" />

If you put that in your delete form, you could use $_POST['id'] to get
the proper id.

 

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

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