HTML interesse |
|
deze vraag had ik bij de vorige versie ook al gevraagd maar toen ik weer keek was versie 2 er al:!:
het probleem:rechts: hij geeft de laatste rij niet weer:s
het script:
<?
$benodigdecredits = '5';
if($_SESSION['login'] == 1) {
include "db.php";
$id = $_SESSION['login'];
$query = "SELECT credits FROM leden WHERE id = $id ";
$resultaat = mysql_query($query) or die ("Er is iets mis met de database");
$obj = mysql_fetch_object($resultaat);
$query2 = "SELECT * FROM software ORDER BY naam ";
$resultaat2 = mysql_query($query2) or die ("Er is iets mis met de database");
$record = mysql_fetch_object($resultaat2);
$id2=$record->id;
$tid=$record->id;
if($obj->credits >= $benodigdecredits) {
echo "<a href='index.php?inh=searchsoft'>Search</a><br><br><table width='50%' border='1' bordercolor='black' cellspacing='0'>";
while ($record = mysql_fetch_object($resultaat2))
{
echo "
<form action='index.php?inh=totalsoftware&tid=$record->id' method='post' name='$id2'>
<tr>
<td width='100%' align='center' bgcolor='gray'>$record->naam</td>
</tr>
<td width='100%' align='left'>Size:$record->size (Kb)<br><br><INPUT TYPE='Submit' NAME='Submit' VALUE='Download'></td>
</tr>
</form>
";
}
echo "</table>";
}
else
{
echo "You don't have enough credits";
}
}
else
{
echo "You're not logged in";
}
?>
<? $benodigdecredits = '5'; if($_SESSION['login'] == 1) { include "db.php"; $id = $_SESSION['login']; $query = "SELECT credits FROM leden WHERE id = $id "; $resultaat = mysql_query($query) or die ("Er is iets mis met de database"); $query2 = "SELECT * FROM software ORDER BY naam "; $resultaat2 = mysql_query($query2) or die ("Er is iets mis met de database"); $id2=$record->id; $tid=$record->id; if($obj->credits >= $benodigdecredits) { echo "<a href='index.php?inh=searchsoft'>Search</a><br><br><table width='50%' border='1' bordercolor='black' cellspacing='0'>"; { <form action='index.php?inh=totalsoftware&tid=$record->id' method='post' name='$id2'> <tr> <td width='100%' align='center' bgcolor='gray'>$record->naam</td> </tr> <td width='100%' align='left'>Size:$record->size (Kb)<br><br><INPUT TYPE='Submit' NAME='Submit' VALUE='Download'></td> </tr> </form> "; } } else { echo "You don't have enough credits"; } } else { echo "You're not logged in"; } ?>
|