I've got an array of usernames that needs to be matched with a db table upon post.
When I post it, I get the following error:
Warning: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /hermes/waloraweb008/b2049/information/folder/page.php on line 43 post_ok|213
This creates the array after the @
sign (Works fine.):
$data = preg_replace('!((@)([-a-zA-Zа-яА-Я()0-9@:%_+.~#?&;//=]+))!i', '<a href="user.php?u=$3">$1</a>', $data);
$mentions = preg_match_all('!((@)([-a-zA-Zа-яА-Я()0-9@:%_+.~#?&;//=]+))!i', $data, $matches);
foreach ($matches as $findnames)
{
$shiz = implode(',',$findnames);
}
This is what I want to check for the array within the db.
$mentionsql = "SELECT * FROM users WHERE username IN '$shiz'";
$mentionquery = mysqli_query($db_conx, $mentionsql);
$row83 = mysqli_fetch_row($mentionquery);
$musername = $row83["username"];
So that I can later do this:
mysqli_query($db_conx, "INSERT INTO notifications(username, initiator, app, which_status,did_read, date_time)
VALUES('$musername','$log_username','<a href=user.php?u=$log_username>$log_username</a> mentioned you in a status.','$statusid',now(),now())");
Any ideas as to why there is an error?