<?php
$host = "localhost"; //99% van de gevallen localhost
$user = "root"; //gebruikersnaam
$pass = "";//Database wachtwoord
$db = "test"; //Database naam
if($_SERVER["REQUEST_METHOD"]=="POST")
{
//Insert het email,naam van de persoon in database
VALUES ('".$_POST["name"]."', '".$_POST["email"]."')") or
die (mysql_error());
echo "<br><br><big><center>Thx for the sign!</center></big>"; print "<META HTTP-EQUIV='Refresh' CONTENT='2; URL=".$_SERVER['PHP_SELF']."'>"; }
?>
<div align="center">
<p><strong><font size="5">Petitie!</font></strong></p>
<form name="form1" method="post" action="
<?php print $_SERVER['PHP_SELF']; ?>">
<table width="70%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="38%" rowspan="6"> </td>
<td width="62%"> <br> <br> </td>
</tr>
<tr>
<td><strong>Naam: </strong></td>
</tr>
<tr>
<td><strong>
<input type="text" name="name">
</strong></td>
</tr>
<tr>
<td><strong>Email: </strong></td>
</tr>
<tr>
<td><input type="text" name="email"></td>
</tr>
<tr>
<td><input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
</form>
<br>
<br>
<table width="70%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FF0000">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td><strong><font size="3"><br>
Redenen:</font></strong></td>
</tr>
<tr>
<td>ik start deze petitie omdak ik vind dat de friet verslaafde gamers
benadeeld worden op MG3 omdat er smorgens geen frieten ter berschikking
worden gesteld.</td>
</tr>
<tr>
<td> </td>
</tr>
</table></td>
</tr>
</table>
<br>
</div>
<div align="center">
<table width="70%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr bgcolor="#000000">
<td> <div align="left"><font color="#FFFFFF"><strong>name:</strong></font></div></td>
<td><font color="#FFFFFF"><strong>email:</strong></font></td>
</tr>
<?php
// Uitlezen van emails
$lezen = mysql_query ("SELECT * FROM `petitie` ORDER BY `id` DESC"); {
//Verander collom kleur
$kleur = ($i++ % 2) ? "#FFCC66" : "#FFB51A"; //Te veranderen
?>
<tr bgcolor="
<?php echo $kleur; ?>">
<td>
<?php echo $read['name']; ?></td>
<td bgcolor="
<?php echo $kleur; ?>">
<?php echo $read['email']; ?></td>
</tr>
<?php
}
?>
</table></td>
</tr>
</table>
<table width="70%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#000000"><font color="#FFFFFF">Er zijn <b>
<? echo $count_rows; ?></b>
personen die zicht hebben toegevoegd</font></td>
</tr>
</table>
<p> </p>
</div>