hi
im pretty new in php (and programming at all), but for a project at school i need to make a festival-site where volunteers can sign up to work at a festival and those people can be 'reserved' by festival-owners to work at their festival.
okay..registrat ion system is done and its also possible already to show a list of volunteers that have been signed up, but now i'd like to make a page where festival-owners can see some extra details of the volunteers.
This is the code;
the variables are dutch so most ppl cant probably read only half of it..but i need to know how to be able to go to a page where i can read contact-details of a volunteer.
i think i need a code like this:
so when people click on "BOOK ME", they would go to the bookvolunteer.p hp page using the ID of the person where the link was printed next to,,,but that doesnt work. the url stays empty like this "http://www.yourdomain. com/bookvolunteer.p hp?id="
how can i fix this?
im pretty new in php (and programming at all), but for a project at school i need to make a festival-site where volunteers can sign up to work at a festival and those people can be 'reserved' by festival-owners to work at their festival.
okay..registrat ion system is done and its also possible already to show a list of volunteers that have been signed up, but now i'd like to make a page where festival-owners can see some extra details of the volunteers.
This is the code;
Code:
$query = "SELECT VRIJWILLIGER_ID, VOORNAAM, ACHTERNAAM, ADRES, POSTCODE, PLAATS, TELNUMMER, BESCHIKBAAR FROM VRIJWILLIGER";
$result = mysql_query($query)
or die("Er is een fout opgetreden");
$num=mysql_numrows($result);
?>
<table border="0" cellspacing="2" cellpadding="2">
<tr>
<th><font face="Arial, Helvetica, sans-serif">ID</font></th>
<th><font face="Arial, Helvetica, sans-serif">Voornaam</font></th>
<th><font face="Arial, Helvetica, sans-serif">Achternaam</font></th>
<th><font face="Arial, Helvetica, sans-serif">Adres</font></th>
<th><font face="Arial, Helvetica, sans-serif">Postcode</font></th>
<th><font face="Arial, Helvetica, sans-serif">Plaats</font></th>
<th><font face="Arial, Helvetica, sans-serif">Telefoon</font></th>
<th><font face="Arial, Helvetica, sans-serif">Beschikbaar</font></th>
</tr>
<?
$i=0;
while ($i < $num) {
$id=mysql_result($result,$i,"VRIJWILLIGER_ID");
$voornaam=mysql_result($result,$i,"VOORNAAM");
$achternaam=mysql_result($result,$i,"ACHTERNAAM");
$adres=mysql_result($result,$i,"ADRES");
$postcode=mysql_result($result,$i,"POSTCODE");
$plaats=mysql_result($result,$i,"PLAATS");
$telefoon=mysql_result($result,$i,"TELNUMMER");
$beschikbaar=mysql_result($result,$i,"BESCHIKBAAR");
if ($beschikbaar==1)
{ $beschikbaar = "YES, <a href=\"bookvolunteer.php?id=" . $row["id"] . "\">BOOK ME</a>";
}
else
{ $beschikbaar = "NO";
}
?>
<tr>
<td><font face="Arial, Helvetica, sans-serif"><? echo $id; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo $voornaam; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo $achternaam; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo $adres; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo $postcode; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo $plaats; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo $telefoon; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo $beschikbaar; ?></font></td>
</tr>
<?
$i++;
}
echo "</table>";
i think i need a code like this:
Code:
if ($beschikbaar==1)
{ $beschikbaar = "YES, <a href=\"bookvolunteer.php?id=" . $row["id"] . "\">BOOK ME</a>";
how can i fix this?
Comment