Jump to content

Recommended Posts

I've got the following script online: http://sbshasselt.be/ictco/maarten/icttips/index.php

It's in dutch but I'll explain the system, depending on the choice you make you'll get an result:

1. Show everything

2. Choose "Vak" - klas and eindterm stays <-- .. -->

..

 

This is the code u used (2. Choose "Vak" - klas and eindterm stays <-- .. -->):

if($leerjaar == '<-- Kies klas -->' && $eindterm == '<-- Kies eindterm -->' && $vak != '<-- Kies vak -->') 
{
?>

	<div align="center" class="style1"><b>Activiteiten voor <? echo $vak ?></b></div>
	<table width="100%" border="1">
		<tr>
   		     	<td width="50px" class="style7"><b><p class="style3">Oefening</p></b></td>
              	<td width="50px" class="style7"><b><p class="style3">Leerjaar</p></b></td>
			<td width="50px" class="style7"><b><p class="style3">Vak</p></b></td>
			<td width="50px" class="style7"><b><p class="style3">Lesonderwerp</p></b></td>
			<td width="50px" class="style7"><b><p class="style3">Doelstelling</p></b></td>
			<td width="20px" class="style7"><b><p class="style3">Media</p></b></td>
			<td width="50px" class="style7"><b><p class="style3">Eindterm</p></b></td>
		</tr>
<?php
		$sql = "SELECT * FROM `formulier` WHERE (`vak` = '$vak') ORDER BY leerjaar ASC";
		$qSelect_berichten  = $db->simpleQuery($sql) or die (mysql_error());
		while($db->fetchInto($qSelect_berichten, $aBerichten, DB_FETCHMODE_ASSOC))
		{
			echo '<tr>
			        <td width="50"><p class="style4">'.$aBerichten['id'].'</p></td>
           		    <td width="50"><p class="style4">'.$aBerichten['leerjaar'].'</p></td>
				<td width="50px"><p class="style4"><img src="vakken/'.$aBerichten['vak'].'.jpg" width="60" height="60" /></p></td>
				<td width="50px"><p class="style4">'.$aBerichten['lesonderwerp'].'</p></td>
				<td width="50px"><p class="style4">'.$aBerichten['doelstelling'].'</p></td>
				<td width="20px"><p class="style4"><a href="'.$aBerichten['ict2'].'" target="_blank"><img src="url.png" width="48" height="48" /></a></p></td>
				<td width="30%"><p class="style4">'.$aBerichten['eindterm'].'</p></td>
			</tr>';
	}
	echo '</table>';
}

 

Now I want to add the following code to my script, WHEN $aBerichten['ict2'] equals "http://"

<td width="20px"><p class="style4"><a href="'.$aBerichten['ict2'].'" target="_blank"><img src="url.png" width="48" height="48" /></a></p></td>

the site shoulld give no image in the column "MEDIA". http://sbshasselt.be/ictco/maarten/icttips/index.php .

Where and How shoulld i adjust this?

I was in the process of modifying your code, but I think you made a mistake with your post because the conditional you requested would evaluate and then display the same for either case.  Your code provided is identical to the code in the sample.  Also--I visited your site and noticed the behavior you were requesting.  There were some media options that had no images.  Has this been resolved?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.