Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <style>
- body {
- font-family: Arial;
- }
- table tr td {
- border-collapse: collapse;
- }
- </style>
- <?php
- $test = "Vul het formulier in!";
- $pee = "";
- $seee = "";
- $ptt = "";
- $sttt = "";
- $pdd = "";
- $sddd = "";
- if($_GET)
- {
- $aee = $_GET["ae"];
- $att = $_GET["at"];
- $add = $_GET["ad"];
- $see = $_GET["se"];
- $seee = $aee * $see;
- $stt = $_GET["st"];
- $sttt = $att * $stt;
- $sdd = $_GET["sd"];
- $sddd = $add * $sdd;
- $pee = $_GET["pe"];
- $ptt = $_GET["pt"];
- $pdd = $_GET["pd"];
- }
- ?>
- </head>
- <form action="#" method="GET">
- <body>
- <table border="1" rowspan="4">
- <tr>
- <td></td>
- <td><b><i>Producten</i></b></td>
- <td><b>Aantal</b></td>
- <td><b>Stukprijs in euro's</b></td>
- </tr>
- <tr>
- <td><i>1</i></td>
- <td><input type="text" name="pe"></td>
- <td><input type="text" name="ae" value="0"></td>
- <td><input type="text" name="se" value="0"></td>
- </tr>
- <tr>
- <td><i>2</i></td>
- <td><input type="text" name="pt"></td>
- <td><input type="text" name="at" value="0"></td>
- <td><input type="text" name="st" value="0"></td>
- </tr>
- <tr>
- <td><i>3</i></td>
- <td><input type="text" name="pd"></td>
- <td><input type="text" name="ad" value="0"></td>
- <td><input type="text" name="sd" value="0"></td>
- </tr>
- <tr>
- <td colspan="2"><input type="submit" name="berekenen" value="Versturen"></td>
- <td colspan="2">
- </td>
- </tr>
- </table>
- <?php
- echo "Product 1 zijn/is $pee , de totaalprijs is $seee";
- echo "<br>";
- echo "Product 2 zijn/is $ptt , de totaalprijs is $sttt";
- echo "<br>";
- echo "Product 3 zijn/is $pdd , de totaalprijs is $sddd";
- echo "<br>";
- if (empty($pee)) {
- echo "Veld 1 is niet ingevuld";
- }
- echo "<br>";
- if (empty($ptt)) {
- echo "Veld 2 is niet ingevuld";
- }
- echo "<br>";
- if (empty($pdd)) {
- echo "Veld 3 is niet ingevuld";
- }
- ?>
- </body>
- <form>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement