TEST - 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 TEST.php
- <?php
- // Message Vars
- $msg = '';
- $msgClass = '';
- // Check For Submit
- if (filter_has_var(INPUT_POST 'submit')) {
- echo "Submitted";
- $name = $_POST['name'];
- $email = $_POST['email'];
- $message = $_POST['message'];
- // Check Req
- if (!empty)/$email && !empty($name) && !empty($message){
- // passes...
- echo 'PASSED';
- }else {
- //failed...
- $msg = 'Du skal udfylde alle 3 felter';
- $msgClass = 'aller-danger';
- }
- }
- ?>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name="description" content="Billig grafisk designer til dit behov og dine ønsker.
- Vi bygger porfesionelt i HRML & css">
- <meta name="keywords" content="bilig designer, Web design, Bilig web desinger, designer skole,
- hvordan laver man en hjemmeside, Hjemmeside, WebDesign, Grafisk designer">
- <title>GGTECH - Designs til dit behov</title>
- <link rel="stylesheet" href="./css/style.css">
- </head>
- <body>
- <section id="section-1">
- <div class="container">
- <header>
- <img src="./images/gglogo.png">
- <nav>
- <ul>
- <li><a href="index.php">HJEM</a></li>
- <li><a href="portfolie.php">PORTFOLIE</a></li>
- </ul>
- </nav>
- </header>
- <div class="content">
- <h1>Hvad Kan vi gøre for dig ?</h1>
- <p>Vi opbygger din hjemmeside</p>
- </div>
- </div>
- </section>
- <section id="section-2">
- <div class="container">
- <div class="over">
- <h1>process ?</h1>
- </div>
- <div id="blurbs">
- <div class="blurb">
- <img class="blurbic" src="./images/logo_html.png">
- <h1>vi bygger i html</h1>
- <p>ALLE VORES HJEMMESIDER
- BLIVER BYGGET I HTML</p>
- </div>
- <div class="blurb">
- <img class="blurbic" src="./images/logo_css.png">
- <h1>vi designer i css</h1>
- <p>ALLE VORES HJEMMESIDER
- BLIVER DESIGNET I CSS</p>
- </div>
- <div class="blurb">
- <img class="blurbic" src="./images/logo_brush.png">
- <h1>vi hoster selv</h1>
- <p>ALLE VORES HJEMMESIDER
- BLIVER HOSTED GENNEM OS</p>
- </div>
- </div>
- </div>
- </section>
- <section id="section-3">
- <div class="container">
- <div class="content">
- <h1>Kontak os nu</h1>
- <p>Vi ser frem til en mail fra dig</p>
- </div>
- <?php if($message !? ''): ?>
- <div class="alert <?php echo $msgClass; ?>"
- <<?php echo $msg; ?>
- </div>
- <?php endif ?>
- <form id="contact-form" method="post" action=">?php echo $_SERVER['PHP_SELF'];?>">
- <div class="form-row">
- <input type="text" name="name" placeholder="Dit Name" required>
- <input type="text" name="email"placeholder="Din Email" required>
- </div>
- <div class="form-row">
- <textarea name="message" placeholder="Din besked" required></textarea>
- </div>
- <div class="form-row">
- <input type="submit" class="big-button" value="Send besked">
- </div>
- </form>
- </div>
- </section>
- <footer>
- <div class="container">
- <div class="copy">
- <p>GGTECH, Copyright ©2020</p>
- </div>
- </div>
- </footer>
- </body>
- </html>
File Description
- TEST
- PHP Code
- 27 Oct-2020
- 3.15 Kb
You can Share it:
Latest PHP Pastes