form - PHP Online
Form of PHP Sandbox
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of form.php
- <!DOCTYPE html>
- <html>
- <head>
- <title>Inschrijfformulier Bit Academy</title>
- <link rel="stylesheet" href="style.css">
- <style>
- #Aanmeldpagina nieuwsbrief {
- font-family: 'Courier New', Courier, monospace;
- }
- </style>
- </head>
- <body>
- <form action="http://localhost:8000/sign_up.html?naam=Lissy" method="GET">
- <h1>Aanmeldpagina nieuwsbrief</h1>
- <div>
- <label for="fname">Naam</label><br>
- <input type="text" id="fname" name="fname"><br>
- </div>
- <div>
- <label for="email">Email</label><br>
- <input type="email" id="email" name="email"><br>
- </div>
- // Remove all illegal characters from email
- $email = filter_var($email, FILTER_SANITIZE_EMAIL);
- // Validate e-mail
- if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
- echo("$email is a valid email address");
- } else {
- echo("$email is not a valid email address");
- }
- <div>
- <label for="phone">Telefoonnummer</label><br>
- <input type="tel" id="phone" name="phone"><br>
- </div>
- <div>
- <label for="pass">Secret</label><br>
- <input type="password" id="pass" name="password"><br>
- </div>
- <p>Favoriete dagen in de week:</p>
- <div>
- <input type="checkbox" id="maandag" name="maandag"
- checked>
- <label for="maandag">Maandag</label>
- </div>
- <div>
- <input type="checkbox" id="dinsdag" name="dinsdag">
- <label for="dinsdag">Dinsdag</label>
- </div>
- <div>
- <input type="checkbox" id="woensdag" name="woensdag">
- <label for="woensdag">Woensdag</label>
- </div>
- <div>
- <input type="checkbox" id="donderdag" name="donderdag">
- <label for="donderdag">Donderdag</label>
- </div>
- <div>
- <input type="checkbox" id="vrijdag" name="vrijdag">
- <label for="vrijdag">Vrijdag</label>
- </div>
- <div>
- <input type="checkbox" id="zaterdag" name="zaterdag">
- <label for="zaterdag">Zaterdag</label>
- </div>
- <div>
- <input type="checkbox" id="zondag" name="zondag">
- <label for="zondag">Zondag</label>
- </div>
- <div>
- <label for="opmerkingen">Opmerkingen:</label>
- </div>
- <div>
- <textarea id="opmerkingen" name="opmerkingen" rows="6" cols="50">
- </textarea>
- </div>
- <div>
- <input type="submit" value="Submit Query"><br>
- <form action="/action_page.php" method="post">
- header('Location: success.php')
- </div>