Results 1 to 2 of 2

Thread: problems combination php and switch content script

  1. #1
    Join Date
    Feb 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default problems combination php and switch content script

    Hello all. I'm kinda new on this forum, so I hope you can help me. I'm having some problems with this switch content script in combination with php


    http://www.dynamicdrive.com/dynamici...tchcontent.htm

    The script tells me that i have to use unique ID to have it properly working. In combination, I use a phpvariable with a counter to have it unique, even put text in there but it doesn't work.
    I followed the javascript code, put an external link but it doesn't work. Now, if I put the example code in the page, without php, it does work. Can someone help me with this one. thanks a lot!!!

    I select a group from a database, and in every group there are multiple logins and passwords available.


    Code:
    <?php
    		$type=mssql_query("SELECT Tech_id FROM TableGROUP BY Tech_id;");
    		
    		echo "<table style='width:100%;'>";
    		$j=0;
            while($row = mssql_fetch_assoc($type))
    		{
    			$j++;
    			$i=1;
    			$variabele = $row['Tech_id'];
    			$toep=mssql_query("SELECT *							  from Table 
    							  where Tech_id = '$variabele'
    							  AND Actief='1' order by Toepassing;");
    			
            	echo "<table border='1' style='width:100%;'>";
    				echo "<tr>";
    					echo "<td colspan='4'style='background-color:#2F4F4F; color:#ffffff;text-decoration:underline;'>"; 
    					echo "<div class=\"handcursor\" id=\"bobcontent$j-title\">$variabele</div>";
    					echo "</td>";
    				echo "</tr>";
    					echo "<div class=\"switchgroup1\" id=\"bobcontent$j\">";
    						while($row = mssql_fetch_assoc($toep))
    						{
    							if($i==1){
    							echo "<tr style=\"background-color:#778899; color:white;\">";
    								echo "<td width='32%'>Application</td>";
       					       		echo "<td width='32%'>Login</td>";
    								echo "<td width='32%'>Password</td>";
    								echo "<td width='3%'></td>";
    							echo "</tr>";
    							echo "<tr>";
    							$i=0;
    							}
    								echo "<td>{$row['Toepassing']}</td>";
    								echo "<td>{$row['Login']}</td>";
    								echo "<td>{$row['Paswoord']}</td>";
    								
    							echo "</tr>";							
    						}
    					echo "</div>";
    			echo "</table>";	
    		}
    		
    		echo "</table>";
    
    		mssql_close();
    		
    		
    	?>

  2. #2
    Join Date
    Feb 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I've solved the problem, problems with the table tags. They do not work in combination with the script.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •