Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Download framework disini --> https://github.com/cscpro/lrdc-fw
- <?php
- if ( $_POST ) {
- // Validating
- if ( ! $_POST['bla1'] ) echo 'Bla1 belum dimasukkan!';
- else {
- // Insert to SQL
- $db->i( 'table_name', 'nama,alamat,bla1', array( $_POST['nama'], $_POST['alamat'], $_POST['bla1'] ) );
- echo 'Berhasil dimasukkan!';
- // Redirect to homepaage
- header( 'Location: /' );
- }
- }
- ?>
- <form method="post">
- <input type="text" name="nama" placeholder="bla 1">
- <input type="text" name="alamat" placeholder="bla 1">
- <input type="text" name="bla1" placeholder="bla 1">
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement