Re: Re: Set variable outside of scope (redo)
| From: | Mike Tuller | Date: | Fri, 06 Jan 2006 19:12:57 +0000 |
| Subject: | Re: Re: Set variable outside of scope (redo) | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-228275@lists.php.net to get a copy of this message | ||
Thanks. That is what I needed. That part works now.
On Jan 5, 2006, at 4:09 PM, comex wrote:
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. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpif ($row[range] != "")