regist - 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 regist.php
- <!DOCTYPE html>
- <html>
- <head>
- <title>Haikal Putra Gustiansyah XI RPL 1 Registrasi</title>
- <link rel="stylesheet" type="text/css" href="css/register.css">
- </head>
- <body>
- <form action="register.php" method="POST">
- <table align="center">
- <tr>
- <th colspan="4">REGISTRASI</th>
- </tr>
- <tr>
- <td>Nama</td>
- <td><input type="text" name="nd"></td>
- <td>Nama Belakang</td>
- <td><input type="text" name="nb"></td>
- </tr>
- <tr>
- <td>Tempat,Tanggal,Lahir</td>
- <td><input type="text" name="ttl"></td>
- </tr>
- <tr>
- <td>Jenis Kelamin</td>
- <td><input type="radio" name="jkelamin" value="Pria">Pria<input type="radio" name="jkelamin" value="Wanita">Wanita</td>
- </tr>
- <tr>
- <td>Agama</td>
- <td>
- <select name="agama">
- <option value="Islam">Islam</option>
- <option value="Protestan">Protestan</option>
- <option value="Katolik">Katolik</option>
- <option value="Buddha">Buddha</option>
- <option value="Hindu">Hindu</option>
- <option value="Konghucu">Konghucu</option>
- </select>
- </td>
- </tr>
- <tr>
- <td>Alamat</td>
- <td><textarea cols="20" rows="3" name="alamat"></textarea></td>
- </tr>
- <tr>
- <td></td>
- <td><input type="submit" name="submit"></td>
- </tr>
- </table>
- </form>
- <?php
- $nd = $_POST['nd'];
- $nb = $_POST['nb'];
- $ttl = $_POST['ttl'];
- $jkelamin = $_POST['jkelamin'];
- $agama = $_POST['agama'];
- $alamat = $_POST['alamat'];
- echo 'Selamat datang '.$nd . ' ' .$nb . ',anda telah berhasil daftar. Data diri anda:' ."<br>";
- echo 'Tempat,tanggal,lahir :'.$ttl. "<br>";
- echo 'Jenis Kelamin'.$jkelamin. "<br>";
- echo 'Agana :'.$agama. "<br>";
- echo 'Alamat :'.$alamat;
- ?>
- </body>
- </html>
File Description
- regist
- PHP Code
- 22 Oct-2019
- 2.05 Kb
You can Share it:
Latest PHP Pastes