Stumped on a simple $_post

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
james2010
Forum Newbie
Posts: 4
Joined: Thu Jan 28, 2010 7:47 am

Stumped on a simple $_post

Post by james2010 »

For some reason, when I assign a variable to a post, it comes back empty:

Code: Select all

 
    if(!empty($_POST)){ 
      $postVals = $_POST['metatags'];
            }
 
When I do a print_r on $post['metatags'] the information appears.
When I do a print_ron on $postVals, it is empty.

Any help is appreciated.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Stumped on a simple $_post

Post by pickle »

Moved to PHP - Code.

Re: your question: Do a var_dump() on both & see what you get. I have to admit though - it does seem odd.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
james2010
Forum Newbie
Posts: 4
Joined: Thu Jan 28, 2010 7:47 am

Re: Stumped on a simple $_post

Post by james2010 »

Thanks for the reply. Figured it out - I had an extra '$' in the print_r - da!
Post Reply