php - How to check if a mysql column is not NULL? -
i track if 'an artist' mysql. if user artist artist column goes null y, have part sorted. however, cannot work out how check if artist column user y can disable features user. site uses cookies logins need have query check y username , password equal cookie. when artist = y content should shown.
here's have far:
$username = $_cookie['username']; $pass = $_cookie['password']; include ("../database.php"); if (mysql_query("select artist members username='$username' , artist = 'y'")) { //artist specific content goes here echo '<div class="bubble"><h1>artist</h1><div class="innerbubble">some text</div></div>'; } no idea now.
//artists if $username = $_cookie['username']; $pass = $_cookie['password']; include ("../database.php"); $result = mysql_query("select artist members username='$username' , artist = 'y'"); $count = mysql_num_rows($result); // check total count artist if ($count > 0) { //artist specific content goes here echo '<div class="bubble"><h1>artist</h1><div class="innerbubble">hi there, see yo artist have access loads of awesome features. contact ease, upload new tracks, share street sessions , tell latest gigs.</div></div>'; }
Comments
Post a Comment