Jump to content

mkr365

Members
  • Posts

    43
  • Joined

  • Last visited

    Never

Posts posted by mkr365

  1. This ois the error±

     

    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '', '7 AND groepen.Groepnaam = 'Architect' GROUP BY Bedrijfsnaam ORDER BY Bedrijf' at line 1

     

    And this the query±

     

    if($_GET['categorien'] != "")
    			$sql = "SELECT * FROM klantgegevens INNER JOIN rubrieken ON klantgegevens.Rubriek = rubrieken.RubriekID INNER JOIN groepen on rubrieken.GroepID = groepen.GroepID WHERE ".$bedrijfsnaam." ".$provincie." AND Rubriek = ".$categorien." AND groepen.Groepnaam = 'Architect' GROUP BY Bedrijfsnaam ORDER BY Bedrijfsnaam LIMIT ".($page*$numresults).", ".$numresults." ";

     

    I forgot to mention that it only goes wrong if i do a search with more than 1 categories. If i search on 2 categories together with an provincie than i get this error

  2. Can anybody see something wrong with this code, cause i get an error on this query. i really can't find it

     

    $sql = "SELECT * FROM klantgegevens INNER JOIN rubrieken ON klantgegevens.Rubriek = rubrieken.RubriekID INNER JOIN groepen on rubrieken.GroepID = groepen.GroepID WHERE ".$bedrijfsnaam." ".$provincie." AND Rubriek = ".$categorien." AND groepen.Groepnaam = 'Architect' GROUP BY Bedrijfsnaam ORDER BY Bedrijfsnaam LIMIT ".($page*$numresults).", ".$numresults." ";

  3. Hello,

     

    I have the next problem:

     

    I have a site where you can press a 'letter' (for example 'a') and it wil show you the company names starting with an 'a'. It will show you 15 results and if it is more than 15, the next results should be on page 2.

     

    The problem is that it wil only show the first 15 results while i have more then 15 company names starting with an 'a'.

     

    $numpages = ceil($count/$numresults); 	  
    
    			if (isset($_GET['page']))
    				$page = $_GET['page'];
    			else
    				$page = 0;
    
    			for ($i = 0; $i<$numpages; $i++)
    			{
    				echo '<a href="architecten.php?zoekletter='.$_GET['zoekletter'].'page='.$i.'">pag '.($i+1).'</a> || ';
    			}
    			echo '<br><br>';

     

    My error logging shows the following: PHP Notice:  Undefined variable: count.

    Can somebody help me with this issue?

     

  4. Well i dont think its that simple. Let me explain the situation a little bit more.

     

    I have in my database lets say several companies, now if you do a search for example on the fist letter of a company on my site i want that output in 2 rows.

     

    At the moment the output shows up in 1 row with a maximum result of 15 companies, everything above the 15 shows up on the next page.

     

     

     

     

  5. Hi,

     

    My output shows up in a table with just 1 row, is it possible that my output shows up in a table with 2 rows? I'm not sure where to start :-[

    A little help would be great!

     

    <?php
    include("test.php");
    
    
    
    echo '<div id="content">';
    
    
    if (isset($_GET['zoekletter']) || isset($_GET['zoek']))
    {
    if (isset($_GET['zoekletter']))
    {
    	echo 'gezocht op letter '.$_GET['zoekletter'].'<br><br>';
    
    	$sql = "SELECT * FROM klantgegevens INNER JOIN rubrieken ON klantgegevens.Rubriek = rubrieken.RubriekID INNER JOIN groepen on rubrieken.GroepID = groepen.GroepID WHERE Bedrijfsnaam LIKE '".$_GET['zoekletter']."%' AND groepen.Groepnaam = 'Architect' GROUP BY Bedrijfsnaam ORDER BY Bedrijfsnaam ";
    	$result = mysql_query($sql) or die(mysql_error()); 
    	$query = mysql_num_rows($result);
    
    	if ($query > 0)
    	{
    		if ($query < 15)
    		{
    			while($query = mysql_fetch_array($result))
    			{
    				$check = url_exists($server.'logos/'.$query['Portfolio'].'.jpg');
    				if ($check == true)
    					$imageurl = 'logos/'.$query['Portfolio'].'.jpg';
    				else
    					$imageurl = $default;
    
    				echo '<table bgcolor="#ffffff" class="border1" onclick=window.open("http://www.test.nl/'.$query['Portfolio'].'")  style="cursor:pointer" onmouseover=style.borderColor="#000000" onmouseout=style.borderColor="#ffffff" width="100%"><tr><td width="35%" rowspan="6" ><img src="'.$imageurl.'"></td><td width="15%">Bedrijfsnaam:</td><td width="50%">'.$query['Bedrijfsnaam'].'</td></tr>
    				<tr><td width="15%">Adres:</td><td width="50%">'.$query['Straat'].' '.$query['Huisnummer'].' '.$query['Toevoeging'].'</td></tr>
    				<tr><td width="15%">Postcode:</td><td width="50%">'.$query['Postcode'].'</td></tr>
    				<tr><td width="15%">Provincie:</td><td width="50%">'.$query['Provincie'].'</td></tr>
    
    				<tr><td width="15%">Portfolio:</td><td width="50%"><a href="http://www.test.nl/'.$query['Portfolio'].'" target="_blanc">www.test.nl/'.$query['Portfolio'].'</a></td></tr>
    				</table><br><br>';

  6. I already have the solution:

     

    <img src="images/test.gif" style="cursor:pointer" alt="tooltip" id="ballon" onclick="return false;"/>

    <script type="text/javascript">

    new HelpBalloon({

    title: \'Mouseover Balloon\',

    content: \'Collin is een aap \'

    + \'.\',

    icon: $(\'ballon\')

     

    });

    </script>

     

    And the balloon pops up underneath other images was a result of a  z-index:1 that shouldn't be there.

  7. Hello,

     

    I have a few problems with the Javascript tooltip script wich i'm running on my site. When you hit a certain link then a balloon with text pops up. But I want the balloon to pop up when i'm hitting on a image, and that is something that i cannot fix.

     

    Another problem is that when my balloon pops up it comes underneath the other images and it should be over the other images.

     

    Can somebody help me with my code  :)

     

    <script type="text/javascript" src="lib/prototype/prototype.js"></script>
            <script type="text/javascript" src="lib/scriptaculous/scriptaculous.js"></script>
            <script type="text/javascript" src="src/HelpBalloon.js"></script>
            <script type="text/javascript">
            <!--
            //
            // Override the default settings to point to the parent directory
            //
            HelpBalloon.Options.prototype = Object.extend(HelpBalloon.Options.prototype, {
                icon: \'images/icon.gif\',
                button: \'images/button.png\',
                balloonPrefix: \'images/balloon-\'
            });
           
            //-->
            </script>
    
    <a href="#" id="ballon" onclick="return false;">img src="images/test.gif"</a>
    <script type="text/javascript">
        new HelpBalloon({
            title: \'Mouseover Balloon\',
            content: \'test tekst ballon \'
                + \'balloon content.\',
            icon: $(\'ballon\')
        });
    </script>

  8. Hello,

     

    I have spend ours and ours just to solve the next problem but i don't see it anymore.

     

    I have some problems with the layout of my checkboxes. In iexplorer everthings looks perfectly fine but in firefox its a mess. Sometimes the name of the checkbox is underneath the checkbox instead of the right side of the checkbox, and because of that some checkboxes are not on the same height.

     

    I don't have css yet for these checkboxes but is it a css problem? Or is something wrong with my code.

     

    $result = mysql_query($sql) or die("MySQL Error<br>SQL statement: $sql<br>Error: ".mysql_error()); 
    
    echo "<table><tr>"; 
    $n = 0;
    
        while($query = mysql_fetch_array($result)) 
    
        { if($n>0 && ($n%$perrow)==0) echo "</tr><tr>";
    
            {if ($categorien == $row['RubriekID']) 
    
                  echo '<td><input type="checkbox" class="box" name="categorien[]" value="'.$query['RubriekID'].'">'.$query['Rubrieknaam'].'<td/>'; 
            else 
                echo '<td><input type="checkbox" class="box" name="categorien[]" value="'.$query['RubriekID'].'">'.$query['Rubrieknaam'].'<td/>'; 
        } 
    $n++;
    }
    while(($n++%$perrow)!=0) echo "<td> </td>";
    echo "</tr></table>"; 
    
    
    echo '</td></tr> 
    <tr><td colspan="2"><input type="submit" value="zoeken"><input type="hidden" name="zoek" value="true"></td></tr> 
    
    </table>

  9. Whoo, I'm still learning so i think i need a little bit more help if you don't mind off course  :D

     

    How does it work if i want this in my while loop.

     

    while($query = mysql_fetch_array($result)) 
        { 
            if ($categorien == $query['RubriekID']) 
                  echo '<input type="checkbox" name="categorien[]" value="'.$query['RubriekID'].'">'.$query['Rubrieknaam'].'<br/>'; 
            else 
                echo '<input type="checkbox" name="categorien[]" value="'.$query['RubriekID'].'">'.$query['Rubrieknaam'].'<br/>'; 
        } 
    echo '</td></tr> 

     

     

  10. Hello,

     

    My checkboxes are being read from a database, that works perfectly fine. They are showing up down te page.

     

    But is it possible that my checkboxes are being shown down the page but now with maximum 4? So you get 4 checkboxes down the page and than a row with another 4 checkboxes and so on.

    At the moment if i have for example 10 checkboxes they are now showing up down the page underneath each other, and i want in each row 4 checkboxes showing up.

     

    I hope its a little bit clear  Wink

     

    if ($categorien == $query['RubriekID']) 
                  echo '<input type="checkbox" name="categorien[]" value="'.$query['RubriekID'].'">'.$query['Rubrieknaam'].'<br />'; 
            else 
                echo '<input type="checkbox" name="categorien[]" value="'.$query['RubriekID'].'">'.$query['Rubrieknaam'].'<br />';

     

  11. Hello,

     

    My checkboxes are being read from a database, that works perfectly fine. They are showing up down te page.

     

    But is it possible that my checkboxes are being shown down the page but now with maximum 4? So you get 4 checkboxes down the page and than a row with another 4 checkboxes and so on.

    At the moment if i have for example 10 checkboxes they are now showing up down the page underneath each other, and i want in each row 4 checkboxes showing up.

     

    I hope its a little bit clear  ;)

     

     

    if ($categorien == $query['RubriekID']) 
                  echo '<input type="checkbox" name="categorien[]" value="'.$query['RubriekID'].'">'.$query['Rubrieknaam'].'<br />'; 
            else 
                echo '<input type="checkbox" name="categorien[]" value="'.$query['RubriekID'].'">'.$query['Rubrieknaam'].'<br />';

     

     

  12. Here is my code:

     

    if ($categorien == $query['RubriekID']) 
                  echo '<input type="checkbox" name="categorien[]" value="'.$query['RubriekID'].'">'.$query['Rubrieknaam'].''; 
            else 
                echo '<input type="checkbox" name="categorien[]" value="'.$query['RubriekID'].'">'.$query['Rubrieknaam'].''; 

     

    They go indeed across the page instead of down the page.

  13. I'm finding some troubles with styling my ckeckboxes in firefox. At the moment i haven't css for my checkboxes so they are showing up from left to right, but i want my checkboxes from top to bottom.

     

    Does someone know there is a standard for styling a checkbox with css?

     

    Thanks in advance!

  14. Well i have another .php file wich is being called by this one. (I have to tell you that im not the one who is the author of this code, im trying to sort it out and change it to my wishes. But d..mn its pretty difficult).

     

    I will post both, i understand if its to much code to sort out.

     

    
    

     

    ?>

     

     

  15. Well i have another .php file wich is being called by this one. (I have to tell you that im not the one who is the author of this code, im trying to sort it out and change it to my wishes. But d..mn its pretty difficult).

     

    I will post both, i understand if its to much code to sort out.

     

    
    

     

    <?php
    include("headerarchitect.php");
    
    
    
    echo '<div id="content">';
    
    
    if (isset($_GET['zoekletter']) || isset($_GET['zoek']))
    {
    if (isset($_GET['zoekletter']))
    {
    	echo 'gezocht op letter '.$_GET['zoekletter'].'<br><br>';
    
    	$sql = "SELECT * FROM klantgegevens INNER JOIN rubrieken ON klantgegevens.Rubriek = rubrieken.RubriekID INNER JOIN groepen on rubrieken.GroepID = groepen.GroepID WHERE Bedrijfsnaam LIKE '".$_GET['zoekletter']."%' AND groepen.Groepnaam = 'Architect' ORDER BY Bedrijfsnaam ";
    	$result = mysql_query($sql) or die(mysql_error()); 
    	$query = mysql_num_rows($result);
    
    	if ($query > 0)
    	{
    		if ($query < 15)
    		{
    			while($query = mysql_fetch_array($result))
    			{
    				$check = url_exists($server.'logos/'.$query['Portfolio'].'.jpg');
    				if ($check == true)
    					$imageurl = 'logos/'.$query['Portfolio'].'.jpg';
    				else
    					$imageurl = $default;
    
    
    
    				echo '<table bgcolor="#ffffff" class="border1" onclick=window.open("http://www.bouwreferentie.nl/'.$query['Portfolio'].'")  style="cursor:pointer" onmouseover=style.borderColor="#13536e" onmouseout=style.borderColor="#5095bc" width="100%"><tr><td width="35%" rowspan="6" ><img src="'.$imageurl.'"></td><td width="15%">Bedrijfsnaam:</td><td width="50%">'.$query['Bedrijfsnaam'].'</td></tr>
    				<tr><td width="15%">Adres:</td><td width="50%">'.$query['Straat'].' '.$query['Huisnummer'].' '.$query['Toevoeging'].'</td></tr>
    				<tr><td width="15%">Postcode:</td><td width="50%">'.$query['Postcode'].'</td></tr>
    				<tr><td width="15%">Provincie:</td><td width="50%">'.$query['Provincie'].'</td></tr>
    				<tr><td width="15%">Rubriek:</td><td width="50%">'.$query['Rubrieknaam'].'</td></tr>
    				<tr><td width="15%">Portfolio:</td><td width="50%"><a href="http://www.bouwreferentie.nl/'.$query['Portfolio'].'" target="_blanc">www.bouwreferentie.nl/'.$query['Portfolio'].'</a></td></tr>
    				</table><br><br>';
    			}
    		}
    		else
    		{
    
    			$numpages = ceil($count/$numresults); 	
    
    			if (isset($_GET['page']))
    				$page = $_GET['page'];
    			else
    				$page = 0;
    
    			for ($i = 0; $i<$numpages; $i++)
    			{
    				echo '<a href="architecten.php?zoekletter='.$_GET['zoekletter'].'page='.$i.'">pag '.($i+1).'</a> || ';
    			}
    			echo '<br><br>';
    
    			$sql = "SELECT * FROM klantgegevens INNER JOIN rubrieken ON klantgegevens.Rubriek = rubrieken.RubriekID INNER JOIN groepen on rubrieken.GroepID = groepen.GroepID WHERE Bedrijfsnaam LIKE '".$_GET['zoekletter']."%' AND groepen.Groepnaam = 'Architect' ORDER BY Bedrijfsnaam LIMIT ".($page*$numresults).", ".$numresults." ";
    			$result = mysql_query($sql) or die(mysql_error()); 
    			while($query = mysql_fetch_array($result))
    			{
    				$check = url_exists($server.'logos/'.$query['Portfolio'].'.jpg');
    				if ($check == true)
    					$imageurl = 'logos/'.$query['Portfolio'].'.jpg';
    				else
    					$imageurl = $default;
    
    				echo '<table bgcolor="#ffffff" class="border1" onclick=window.open("http://www.bouwreferentie.nl/'.$query['Portfolio'].'")  style="cursor:pointer" onmouseover=style.borderColor="#13536e" onmouseout=style.borderColor="#5095bc" width="100%"><tr><td width="35%" rowspan="6" ><img src="'.$imageurl.'"></td><td width="15%">Bedrijfsnaam:</td><td width="50%">'.$query['Bedrijfsnaam'].'</td></tr>
    				<tr><td width="15%">Adres:</td><td width="50%">'.$query['Straat'].' '.$query['Huisnummer'].' '.$query['Toevoeging'].'</td></tr>
    				<tr><td width="15%">Postcode:</td><td width="50%">'.$query['Postcode'].'</td></tr>
    				<tr><td width="15%">Provincie:</td><td width="50%">'.$query['Provincie'].'</td></tr>
    				<tr><td width="15%">Rubriek:</td><td width="50%">'.$query['Rubrieknaam'].'</td></tr>
    				<tr><td width="15%">Portfolio:</td><td width="50%"><a href="http://www.bouwreferentie.nl/'.$query['Portfolio'].'" target="_blanc">www.bouwreferentie.nl/'.$query['Portfolio'].'</a></td></tr>
    				</table><br><br>';
    			}
    			echo '|| ';
    			for ($i = 0; $i<$numpages; $i++)
    			{
    				echo '<a href="architecten.php?zoekletter='.$_GET['zoekletter'].'page='.$i.'">pag '.($i+1).'</a> || ';
    			}
    
    		}
    	}
    	else
    	{
    		echo 'Helaas geen bedrijven gevonden.';		
    	}
    }
    
    if (isset($_GET['zoek']))
    {
    	//echo 'gezocht op woord '.$_GET['zoek'].'<br><br>';
    	$first = true;
    
    	if ($bedrijfsnaam != NULL)
    	{
    		$bedrijfsnaam = 'Bedrijfsnaam LIKE "%'.$bedrijfsnaam.'%" ';
    		$first = false;
    	}
    	else
    		$bedrijfsnaam = "";	
    
    	if ($provincie != NULL)
    	{	
    		if ($first == false)
    		{
    			$provincie = 'AND Provincie LIKE "%'.$provincie.'%" ';	
    		}
    		else
    			$provincie = 'Provincie LIKE "%'.$provincie.'%" ';		
    		$first = false;
    	}
    	if (($categorien != "") && ($bedrijfsnaam == NULL) && ($provincie == NULL))
    	{
    		$categorie = true;
    	}
    
    	if (($first == false) || ($categorie == true))
    	{
    		if($categorien != "")
    			$sql = "SELECT * FROM klantgegevens INNER JOIN rubrieken ON klantgegevens.Rubriek = rubrieken.RubriekID INNER JOIN groepen on rubrieken.GroepID = groepen.GroepID WHERE ".$bedrijfsnaam." ".$provincie." AND Rubriek = ".$categorien." AND groepen.Groepnaam = 'Architect' ORDER BY Bedrijfsnaam  ";
    		else
    			$sql = "SELECT * FROM klantgegevens INNER JOIN rubrieken ON klantgegevens.Rubriek = rubrieken.RubriekID INNER JOIN groepen on rubrieken.GroepID = groepen.GroepID WHERE ".$bedrijfsnaam." ".$provincie." AND groepen.Groepnaam = 'Architect' ORDER BY Bedrijfsnaam ";
    		if ($categorie == true)
    			$sql = "SELECT * FROM klantgegevens INNER JOIN rubrieken ON klantgegevens.Rubriek = rubrieken.RubriekID INNER JOIN groepen on rubrieken.GroepID = groepen.GroepID WHERE Rubriek = ".$categorien." AND groepen.Groepnaam = 'Architect' ORDER BY Bedrijfsnaam  ";
    
    		$result = mysql_query($sql) or die(mysql_error()); 
    		$query = mysql_num_rows($result);
    		if ($query > 0)
    		{
    			if ($query < 15)
    			{
    				while($query = mysql_fetch_array($result))
    				{
    					$check = url_exists($server.'logos/'.$query['Portfolio'].'.jpg');
    					if ($check == true)
    						$imageurl = 'logos/'.$query['Portfolio'].'.jpg';
    					else
    						$imageurl = $default;
    
    					echo '<table bgcolor="#ffffff" class="border1" onclick=window.open("http://www.bouwreferentie.nl/'.$query['Portfolio'].'")  style="cursor:pointer" onmouseover=style.borderColor="#13536e" onmouseout=style.borderColor="#5095bc" width="100%"><tr><td width="35%" rowspan="6" ><img src="'.$imageurl.'"></td><td width="15%">Bedrijfsnaam:</td><td width="50%">'.$query['Bedrijfsnaam'].'</td></tr>
    				<tr><td width="15%">Adres:</td><td width="50%">'.$query['Straat'].' '.$query['Huisnummer'].' '.$query['Toevoeging'].'</td></tr>
    				<tr><td width="15%">Postcode:</td><td width="50%">'.$query['Postcode'].'</td></tr>
    				<tr><td width="15%">Provincie:</td><td width="50%">'.$query['Provincie'].'</td></tr>
    				<tr><td width="15%">Rubriek:</td><td width="50%">'.$query['Rubrieknaam'].'</td></tr>
    				<tr><td width="15%">Portfolio:</td><td width="50%"><a href="http://www.bouwreferentie.nl/'.$query['Portfolio'].'" target="_blanc">www.bouwreferentie.nl/'.$query['Portfolio'].'</a></td></tr>
    				</table><br><br>';
    				}
    			}
    			else
    			{
    
    				$numpages = ceil($query/$numresults);
    				//echo 'num pages = '.$numpages; 	
    
    				if (isset($_GET['page']))
    					$page = $_GET['page'];
    				else
    					$page = 0;
    
    				for ($i = 0; $i<$numpages; $i++)
    				{
    					echo '<a href="architecten.php?bedrijfsnaam='.$bedrijfsnaam.'&provincie='.$provincie.'&categorien='.$categorien.'&zoek=true&page='.$i.'">pag '.($i+1).'</a> || ';
    				}
    				echo '<br><br>';
    
    				if($categorien != "")
    			$sql = "SELECT * FROM klantgegevens INNER JOIN rubrieken ON klantgegevens.Rubriek = rubrieken.RubriekID INNER JOIN groepen on rubrieken.GroepID = groepen.GroepID WHERE ".$bedrijfsnaam." ".$provincie." AND Rubriek = ".$categorien." AND groepen.Groepnaam = 'Architect' ORDER BY Bedrijfsnaam LIMIT ".($page*$numresults).", ".$numresults."  ";
    		else
    			$sql = "SELECT * FROM klantgegevens INNER JOIN rubrieken ON klantgegevens.Rubriek = rubrieken.RubriekID INNER JOIN groepen on rubrieken.GroepID = groepen.GroepID WHERE ".$bedrijfsnaam." ".$provincie." AND groepen.Groepnaam = 'Architect' ORDER BY Bedrijfsnaam LIMIT ".($page*$numresults).", ".$numresults." ";
    		if ($categorie == true)
    			$sql = "SELECT * FROM klantgegevens INNER JOIN rubrieken ON klantgegevens.Rubriek = rubrieken.RubriekID INNER JOIN groepen on rubrieken.GroepID = groepen.GroepID WHERE Rubriek = ".$categorien." AND groepen.Groepnaam = 'Architect' ORDER BY Bedrijfsnaam LIMIT ".($page*$numresults).", ".$numresults."  ";
    
    				$result = mysql_query($sql) or die(mysql_error()); 
    				while($query = mysql_fetch_array($result))
    				{
    					$check = url_exists($server.'logos/'.$query['Portfolio'].'.jpg');
    					if ($check == true)
    						$imageurl = 'logos/'.$query['Portfolio'].'.jpg';
    					else
    						$imageurl = $default;
    
    					echo '<table bgcolor="#ffffff" class="border1" onclick=window.open("http://www.bouwreferentie.nl/'.$query['Portfolio'].'")  style="cursor:pointer" onmouseover=style.borderColor="#13536e" onmouseout=style.borderColor="#5095bc" width="100%"><tr><td width="35%" rowspan="6" ><img src="'.$imageurl.'"></td><td width="15%">Bedrijfsnaam:</td><td width="50%">'.$query['Bedrijfsnaam'].'</td></tr>
    				<tr><td width="15%">Adres:</td><td width="50%">'.$query['Straat'].' '.$query['Huisnummer'].' '.$query['Toevoeging'].'</td></tr>
    				<tr><td width="15%">Postcode:</td><td width="50%">'.$query['Postcode'].'</td></tr>
    				<tr><td width="15%">Provincie:</td><td width="50%">'.$query['Provincie'].'</td></tr>
    				<tr><td width="15%">Rubriek:</td><td width="50%">'.$query['Rubrieknaam'].'</td></tr>
    				<tr><td width="15%">Portfolio:</td><td width="50%"><a href="http://www.bouwreferentie.nl/'.$query['Portfolio'].'" target="_blanc">www.bouwreferentie.nl/'.$query['Portfolio'].'</a></td></tr>
    				</table><br><br>';
    				}
    				echo '|| ';
    				for ($i = 0; $i<$numpages; $i++)
    				{
    					echo '<a href="architecten.php?bedrijfsnaam='.$bedrijfsnaam.'&provincie='.$provincie.'&categorien='.$categorien.'&zoek=true&page='.$i.'">pag '.($i+1).'</a> || ';
    				}
    
    			}
    		}
    		else
    		{
    			echo 'Helaas geen bedrijven gevonden.';		
    		}
    	}
    }
    }
    else
    {
    $sql = "SELECT * FROM klantgegevens INNER JOIN rubrieken ON klantgegevens.Rubriek = rubrieken.RubriekID INNER JOIN groepen on rubrieken.GroepID = groepen.GroepID WHERE groepen.Groepnaam = 'Architect' ORDER BY Bedrijfsnaam ";
    $result = mysql_query($sql) or die(mysql_error()); 
    $count = mysql_num_rows($result);
    if ($count < 15)
    {
    	while($query = mysql_fetch_array($result))
    	{
    		$check = url_exists($server.'logos/'.$query['Portfolio'].'.jpg');
    		if ($check == true)
    			$imageurl = 'logos/'.$query['Portfolio'].'.jpg';
    		else
    			$imageurl = $default;
    
    		echo '<table bgcolor="#ffffff" class="border1" onclick=window.open("http://www.bouwreferentie.nl/'.$query['Portfolio'].'")  style="cursor:pointer" onmouseover=style.borderColor="#13536e" onmouseout=style.borderColor="#5095bc" width="100%"><tr><td width="35%" rowspan="6" ><img src="'.$imageurl.'"></td><td width="15%">Bedrijfsnaam:</td><td width="50%">'.$query['Bedrijfsnaam'].'</td></tr>
    				<tr><td width="15%">Adres:</td><td width="50%">'.$query['Straat'].' '.$query['Huisnummer'].' '.$query['Toevoeging'].'</td></tr>
    				<tr><td width="15%">Postcode:</td><td width="50%">'.$query['Postcode'].'</td></tr>
    				<tr><td width="15%">Provincie:</td><td width="50%">'.$query['Provincie'].'</td></tr>
    				<tr><td width="15%">Rubriek:</td><td width="50%">'.$query['Rubrieknaam'].'</td></tr>
    				<tr><td width="15%">Portfolio:</td><td width="50%"><a href="http://www.bouwreferentie.nl/'.$query['Portfolio'].'" target="_blanc">www.bouwreferentie.nl/'.$query['Portfolio'].'</a></td></tr>
    				</table><br><br>';
    	}
    }
    else
    {
    
    	$numpages = ceil($count/$numresults);
    	//echo 'num pages = '.$numpages; 	
    
    	if (isset($_GET['page']))
    		$page = $_GET['page'];
    	else
    		$page = 0;
    
    	for ($i = 0; $i<$numpages; $i++)
    	{
    		echo '<a href="architecten.php?page='.$i.'">pag '.($i+1).'</a> || ';
    	}
    	echo '<br><br>';
    
    	$sql = "SELECT * FROM klantgegevens INNER JOIN rubrieken ON klantgegevens.Rubriek = rubrieken.RubriekID INNER JOIN groepen on rubrieken.GroepID = groepen.GroepID WHERE groepen.Groepnaam = 'Architect' ORDER BY Bedrijfsnaam LIMIT ".($page*$numresults).", ".$numresults." ";
    	$result = mysql_query($sql) or die(mysql_error()); 
    	while($query = mysql_fetch_array($result))
    	{
    		$check = url_exists($server.'logos/'.$query['Portfolio'].'.jpg');
    		if ($check == true)
    			$imageurl = 'logos/'.$query['Portfolio'].'.jpg';
    		else
    			$imageurl = $default;
    
    		echo '<table bgcolor="#ffffff" class="border1" onclick=window.open("http://www.bouwreferentie.nl/'.$query['Portfolio'].'")  style="cursor:pointer" onmouseover=style.borderColor="#13536e" onmouseout=style.borderColor="#5095bc" width="100%"><tr><td width="35%" rowspan="6" ><img src="'.$imageurl.'"></td><td width="15%">Bedrijfsnaam:</td><td width="50%">'.$query['Bedrijfsnaam'].'</td></tr>
    				<tr><td width="15%">Adres:</td><td width="50%">'.$query['Straat'].' '.$query['Huisnummer'].' '.$query['Toevoeging'].'</td></tr>
    				<tr><td width="15%">Postcode:</td><td width="50%">'.$query['Postcode'].'</td></tr>
    				<tr><td width="15%">Provincie:</td><td width="50%">'.$query['Provincie'].'</td></tr>
    				<tr><td width="15%">Rubriek:</td><td width="50%">'.$query['Rubrieknaam'].'</td></tr>
    				<tr><td width="15%">Portfolio:</td><td width="50%"><a href="http://www.bouwreferentie.nl/'.$query['Portfolio'].'" target="_blanc">www.bouwreferentie.nl/'.$query['Portfolio'].'</a></td></tr>
    				</table><br><br>';
    	}
    	echo '|| ';
    	for ($i = 0; $i<$numpages; $i++)
    	{
    		echo '<a href="architecten.php?page='.$i.'">pag '.($i+1).'</a> || ';
    	}
    
    }
    }
    
    include("footer.php");
    
    ?>

     

     

  16. Well i have another .php file wich is being called by this one. (I have to tell you that im not the one who is the author of this code, im trying to sort it out and change it to my wishes. But d..mn its pretty difficult).

     

    I will post both, i understand if its to much code to sort out.

     

     

  17. Hello,

     

    On this moment i am using the code below for changing the background table color after a mousover wich is working. But now i want a mousover for changing the table border color. I really cant find how to do that.

    Does somebody know how to do that?

     

    <table bgcolor="#ffffff" onMouseOver=this.bgColor="#99CCFF" onMouseOut=this.bgColor="#FFFFFF" width="100%" STYLE="border: 1px solid #b7b7b9; border-collapse: separate; border-spacing: 2px"

     

    Thanks in advance!

     

     

  18. Well i have another .php file wich is being called by this one. (I have to tell you that im not the one who is the author of this code, im trying to sort it out and change it to my wishes. But d..mn its pretty difficult).

     

    I will post both, i understand if its to much code to sort out.

     

     

  19. WHoooo you are the MAN!

     

    Very thanks, this helped me so much. There are some other issues that i have, but i'm going to sort that out by myself first (at least i'm going to try). I hope i can ask you some questions in the future.

     

    Thanks again!

     

    Marcel

  20. This is what its shows if i select 2 checkboxes:

     

    SELECT * FROM klantgegevens INNER JOIN rubrieken ON klantgegevens.Rubriek = rubrieken.RubriekID INNER JOIN groepen on rubrieken.GroepID = groepen.GroepID WHERE Rubriek IN ('1, 6') AND groepen.Groepnaam = 'Architect' ORDER BY Bedrijfsnaam

     

    The 1 and 6 stands for the rubriek ID, so in this example i've selected 2 checkboxes with the rubriekID 1 and 6.

     

    And this example is when 1 checkbox is selected with the rubriekID is 1, which is working ok

    SELECT * FROM klantgegevens INNER JOIN rubrieken ON klantgegevens.Rubriek = rubrieken.RubriekID INNER JOIN groepen on rubrieken.GroepID = groepen.GroepID WHERE Rubriek IN ('1') AND groepen.Groepnaam = 'Architect' ORDER BY Bedrijfsnaam

     

     

     

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.