I've been struggling on this for a couple of hours now, why is my INSERT not working? I've done similair things before, and I figure i'm missing something pretty obvious. Can someone point it out?
add.php
<?php include '../includes/connect.php'; ?> <?php if($_POST['coupon']){ $coupon = $_POST['coupon']; $waarde = $_POST['waarde']; $datum = $_POST['datum']; $insert = "INSERT INTO adwords (coupon, waarde, datum) VALUES ('$coupon', '$waarde', '$datum ')" or die(mysql_error()); echo "Succes. <br />"; echo "<a href=\"index.php\">Terug</a>"; } ?>index.php
<?php include 'add.php'; ?> <!DOCTYPE HTML> <html xmlns="http://www.w3.org/1999/xhtml" lang="nl"> <title>/Adwords/</title> <style> h1, h2 { margin:0px; padding:0px; } body { margin:120px auto 0 auto; width:960px; } label { width:100px; float:left; } </style> </head> <body> <h1>Adwords Coupon Advertentietegoed</h1> <form action="add.php" method="post"> <label for="coupon">Couponcode: </label><input type="text" name="coupon" /><br /> <label for="waarde">Waarde: </label><input type="text" name="waarde" /><br /> <label for="datum">Geldig t/m: </label><input type="text" name="datum" /><br /> <input type="submit" name="submit" id="submit" /> </form> <?php $query = mysql_query("SELECT * FROM adwords") or die(mysql_error()); ?> <table border="1"> <tr> <td>Couponcode</td> <td>Waarde</td> <td>Geldig tot</td> <td> </td> </tr> <?php while($row = mysql_fetch_array($query)) { ?> <tr> <td><?= $row['coupon']; ?></td> <td>€ <?= $row['waarde']; ?>,-</td> <td><?= $row['datum']; ?></td> <td><a href="">Verbruikt?</a></td> </tr> <? } ?> </table> </body> </html>Table is being made, and echo's stuff from the DB just fine, but I can't seem to add anything new to it.