while ($row = mysql_fetch_assoc($query)){ 
		
        echo("<tr id='$a' bgcolor='B0C4DE'>"); 
	    $sr_num=$row['b_sr_num'];
		echo ('<td>'.$row['b_sr_num'].'</td>');
		echo ('<td>'.$row['b_name'].'</td>');
		echo ('<td>'.$row['b_author'].'</td>');
		echo ('<td>'.$row['b_avail'].'</td>');
	
		if($row['b_avail']>0)
		{
				if (!$_SESSION["valid_user"])
        {
        // User not logged in, redirect to login page
		echo("<td>Available</td>");
		}else
echo("<td><INPUT TYPE=button  id=show  name=show[] value=add onClick=buttonPress('$sr_num','$a')></td>");

can you give me the code of or sample to use next

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.