Re: [PHP-DB] Value of $_POST['submit']
[email protected] ("Fergus Gibson")
| Newsgroups | php.db |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Nov 27, 2008 at 5:02 PM, Ron Piggott <[email protected]> wrote: > I am wondering how my PHP script may access the value of value of > $_POST['submit']. At present echo $_POST['submit']; doesn't give me a > value. Consequently all queries to the mySQL database fail. Ron, is your AJAX request a POST? Is it actually assigning a value to "submit"? It sounds like that datum is missing because it's not being sent. Steve is incorrect in suggesting that $_POST['submit'] will be populated with data from an HTML input of type "submit". To achieve the effect he is describing, you would need to add name="submit" to that input. None of the keys of $_POST are magically populated. If your request doesn't submit a variable named "submit", there will be no such key in the array.