If i want to print a message "Has Private Pictures" if a member has private images from a SQL table row "catid" do i do it in php or SQL? I have no idea how to do it 0 = public 1 = private
In short, you need to do it in both PHP and SQL. You need to save '0' or '1' value in MySQL table and during the query check if it is 0 or 1 and show the message or picture accordingly.
First I would check the value: //Connect to mysql database $check_pms = mysql_fetch_row(mysql_query("SELECT `catid` FROM `tablename` WHERE `user_id`='USERID'")); if($check_pms[0] == ){ echo 'Private ';}else{ echo 'Public ';} echo 'Pictures'; //Disconnect form mysql database PHP: Peace,