[SOLVED] Verifying Users part2

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
anthony88guy
Forum Contributor
Posts: 246
Joined: Thu Jan 20, 2005 8:22 pm

[SOLVED] Verifying Users part2

Post by anthony88guy »

Ok, i can display the users that have to verifed, but when i get the box and submit it to be verifed (update the database) it doesn't.
Last edited by anthony88guy on Thu May 12, 2005 5:46 pm, edited 3 times in total.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

It is what the error sais, you are supplying $_POST['vusername'] which does not appear to be an array.
try print_r($_POST['vusername']); before the foreach() to see what that variable actually contains.
anthony88guy
Forum Contributor
Posts: 246
Joined: Thu Jan 20, 2005 8:22 pm

Post by anthony88guy »

Warning: Invalid argument supplied for foreach() in /home/*********************.php on line 135

So its still an error on line 135 which is
Line 135: foreach($_POST['name'] as $name => $value){

I will test it with just "print_r($_POST['name'])"

EDIT: I tried with just "print_r($_POST['name'])" can it prints nothing.
Last edited by anthony88guy on Thu May 12, 2005 6:02 pm, edited 1 time in total.
anthony88guy
Forum Contributor
Posts: 246
Joined: Thu Jan 20, 2005 8:22 pm

Post by anthony88guy »

bump
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

anthony88guy wrote: EDIT: I tried with just "print_r($_POST['vusername'])" can it prints nothing.
Then it's probably not an array.

what does the source look like before you submit it?

does it show:

Code: Select all

<input name=&quote;vusername&#1111;]&quote; type=&quote;checkbox&quote;>
or some derivitive of that?

try also echoing $_POST['vusername'] and see if it says "Array"

from what you posted (for all intents and purposes), it looks to me like it should work, but if print_r isn't giving you anything...there's someting awry
anthony88guy
Forum Contributor
Posts: 246
Joined: Thu Jan 20, 2005 8:22 pm

Post by anthony88guy »

This is what my verification page looks like:
Post Reply