Little help.

I’m having a issue with this.

[php]$GrabDataPoll5 = mysql_query(“SELECT type,pokemon FROM poll_list WHERE removed!=‘yes’”);

$PokeList = array();
while($row = mysql_fetch_array($GrabDataPoll5)) 
{ $PokeList[] = "'".$row['type']."".$row['pokemon']."'"; }
$PokeList = implode(",", $PokeList);

if(!in_array($Pokemon, $PokeList)) {
$Result = “Select a valid Pokemon.”;

what errors? Do you get any error messages?

Warning: in_array() []: Wrong datatype for second argument in /home/tpkrpg/public_html/poll.php on line 73

Trying make that results in the while loop into array for the the in_array.

looks to me like you’re passing a string as the second arg instead of an array.
[php]$PokeList = implode(",", $PokeList);
if(!in_array($Pokemon, $PokeList)) {[/php]

comment out the implode line and it should work.

Red :wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service