content won't display

Ask about a PHP problem here.
Post Reply
Porkypie
Posts: 25
Joined: Wed Jan 02, 2013 3:52 pm
Location: Netherlands

content won't display

Post by Porkypie »

Hey!

I made this "while loop", but the content that comes after my loops won't display anymore.

Can anyone tell me why? here's the code:
	<?php

$result = mysql_query("SELECT `gebruikers_naam`, `achternaam`, `voornaam`, `email`, `telefoon` FROM gebruikers");
echo mysql_error();
	echo	"<table>
				<tr>
					<th style='display:none;'>id</th>
					<th>Gebruikersnaam</th>
					<th>voornaam</th>
					<th>achternaam</th>
					<th>E-mail</th>
					<th>telefoon</th>
					<th>wijzigen</th>
					<th>Verwijderen</th>
				</tr>";
					
			
			while ($row = mysql_fetch_array($result)){
			
	echo		"<tr>";
	echo			"<td style='display:none;'>" . $row['id'] . "</td>";		
	echo			"<td>" . $row['gebruikers_naam'] . "</td>";		
	echo			"<td>" . $row['voornaam'] . "</td>";		
	echo			"<td>" . $row['achternaam'] . "</td>";		
	echo			"<td>" . $row['email'] . "</td>";		
	echo			"<td>" . $row['telefoon'] . "</td>";	
	echo			"<td> wijzig </td>";		
	echo			"<td> <input type='button' name='verwijderen' value='verwijder' /> </td>";		
	echo		"</tr>";
			}
	echo	"</table>";
	
				die();
			?>		
ExtremeGaming
Posts: 205
Joined: Mon Jul 09, 2012 11:13 pm

Re: content won't display

Post by ExtremeGaming »

Well anything after the loop is being cancelled by your call of die(); which ends the entire script.
<?php while(!$succeed = try()); ?>
Post Reply