Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy. This forum is not for asking programming related questions.
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: Posting Code in the Forums to learn how to do it too.
Hi,
I've been banging my head all day and I can't figure it out.
$find = strip_tags($find);
$find = trim($find);
$find = strtoupper($find);
$data = mysql_query("SELECT * FROM profiles");
while ($ss1 = mysql_fetch_array( $data ))
{$ss3=$ss1['keywords']; $ss4=(explode(",",$ss3));
for ($x=0; $x<count($ss4); $x++){
$ss5=strip_tags($ss4[$x]);
$ss5=trim($ss4[$x]);
$ss5=strtoupper($ss4[$x]);
if ($find==$ss5){ $profile=$ss1['name']; $pro_lvl=$ss1['prolvl'];
$query=("insert into search(profile,pro_lvl,id) values ('$profile','$pro_lvl','$id')");
$result = mysql_query($query);
}}}
It's supposed to insert all matches into table, but it only does if the first object ([0]) matches.
If it's [3] loop doesn't see it.
Please help ASAP.
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: Posting Code in the Forums to learn how to do it too.