php/html/mysql

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
shyam m suvarna
Forum Newbie
Posts: 1
Joined: Thu Jan 23, 2014 9:55 am

php/html/mysql

Post by shyam m suvarna »

when clicking the 2nd toggle button its toggling but not displaying/ fetching contents from next details. check out and find error to solve this,

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>

    </head>
    

        <script type="text/javascript">
function toggleMe(a){
var e=document.getElementById(a);
if(!e)return true;
if(e.style.display=="none"){
e.style.display="block"
}
else{
e.style.display="none"
}
return true;
}
</script>

      
       <form action="index.php" method="POST">
   
                        <h1> bhavageethe type of sugama sangeetha song are listed here "</h1></span>
            <table align="left">
           
    <?php


    require 'connect.php';
    
  



    $query2 = mysql_query("SELECT * FROM media where `category`='bhavageethe'  ORDER BY `name` ASC ") or die($query."<br/><br/>".mysql_error());;
	if(mysql_num_rows($query2)>0 ){   

 for($i=0;$i<$row = mysql_fetch_assoc($query2);$i++){
    
        ?>

    <input type="button" onclick="return toggleMe('special1')" value=" 
                   name: <?php echo $row["name"] ?>"
 </p>
<p id="special1" style="display:none">
</br>
                  name: <?php echo $row["name"] ?></br>  
                 category:
                   <?php echo $row["category"] ?></br>
                 album:
                   <?php echo $row["album"] ?></br>
                   artist:
                   <?php echo $row["artist"] ?></br>
                  composer:
                   <?php echo $row["composer"] ?>
                   <?php echo $row["type"] ?></br>
                  size:
                   <?php echo $row["size"] ?></br>
                 rating:
                   <?php echo $row["rating"] ?></br>              
               shared:   
                   <?php echo $row["shared"] ?></br>           
                  uploaded by:
                   <?php echo $row["uploadby"] ?></br>  cost:</span>
                   <?php echo $row["cost"] ?></br>
			   contact:
                <?php echo $row["contact"] ?></br> 
                 To download file click:
                    <a href="<?php echo $row['location'] ?>" > download </a>
					</br>
        
			 </p></br>
		
                
<?php
}

}
?>
         
     <br/>
     <br/>
                        <input type="button" value="back" spanstyle="color:red" onclick="history.go(-1)"  style="height: 30px; width: 100px"/>

        </form>
        
    </body>
</html>
Last edited by requinix on Thu Jan 23, 2014 1:04 pm, edited 1 time in total.
Reason: please use [syntax] tags when posting code
Post Reply